]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
template: Improved lxc-plamo template
authorKATOH Yasufumi <karma@jazz.email.ne.jp>
Thu, 10 Oct 2013 06:54:54 +0000 (15:54 +0900)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 10 Oct 2013 17:30:44 +0000 (13:30 -0400)
lxc-plamo now work with any distribution other than Plamo Linux.

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Signed-off-by: TAMUKI Shoichi <tamuki@linet.gr.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
templates/lxc-plamo.in

index 81866571c2cd14250b876aa5cb04a3017b8bfeb2..7f8e125a499b09082181a5f23237b0a08e8c485e 100644 (file)
@@ -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