From 92cbfdaf682dca9cf60243f23c2e911181bfc7ab Mon Sep 17 00:00:00 2001 From: KATOH Yasufumi Date: Thu, 10 Oct 2013 15:54:54 +0900 Subject: [PATCH] template: Improved lxc-plamo template MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit lxc-plamo now work with any distribution other than Plamo Linux. Signed-off-by: KATOH Yasufumi Signed-off-by: TAMUKI Shoichi Acked-by: Stéphane Graber --- templates/lxc-plamo.in | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/templates/lxc-plamo.in b/templates/lxc-plamo.in index 81866571c..7f8e125a4 100644 --- a/templates/lxc-plamo.in +++ b/templates/lxc-plamo.in @@ -123,6 +123,13 @@ install_plamo() { return 1 fi fi + if [ ! -x /sbin/installpkg ] ; then + echo "'installpkg' command is missing." + echo "Installing 'installpkg' command into $dlcache/sbin..." + ( cd $dlcache ; tar xpJf hdsetup-*.txz ; rm -rf tmp usr var ) + sed -i "/ldconfig/!s@/sbin@$dlcache&@g" $dlcache/sbin/installpkg* + PATH=$dlcache/sbin:$PATH + fi echo "Installing packages to $rtcache..." if [ ! -d $rtcache ] ; then mkdir -p $rtcache @@ -339,10 +346,6 @@ if [ $hostarch == "x86" -a $arch == "x86_64" ] ; then echo "Can't create x86_64 container on x86." exit 1 fi -if ! type installpkg ; then - echo "'installpkg' command is missing." - exit 1 -fi if [ -z "$path" ] ; then echo "'path' parameter is required." exit 1 -- 2.47.2