From: KATOH Yasufumi Date: Thu, 10 Oct 2013 06:54:54 +0000 (+0900) Subject: template: Improved lxc-plamo template X-Git-Tag: lxc-1.0.0.alpha2~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92cbfdaf682dca9cf60243f23c2e911181bfc7ab;p=thirdparty%2Flxc.git template: Improved lxc-plamo template 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 --- 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