[lxc-devel] [lxc-templates/master] plamo: Support current pkgtools

tenforward on Github lxc-bot at linuxcontainers.org
Thu Sep 3 09:00:55 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 434 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200903/8aa104dc/attachment.bin>
-------------- next part --------------
From 4c11070332fa6c301be4dbd2de8900afd5148f9a Mon Sep 17 00:00:00 2001
From: KATOH Yasufumi <karma at jazz.email.ne.jp>
Date: Thu, 3 Sep 2020 14:42:29 +0900
Subject: [PATCH] plamo: Support current pkgtools

Our package manager "pkgtools" is updated, and renamed "pkgtools7".

Signed-off-by: KATOH Yasufumi <karma at jazz.email.ne.jp>
---
 templates/lxc-plamo.in | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/templates/lxc-plamo.in b/templates/lxc-plamo.in
index 2145d01..57f8951 100644
--- a/templates/lxc-plamo.in
+++ b/templates/lxc-plamo.in
@@ -123,13 +123,18 @@ install_plamo() {
     echo "Installing 'installpkg' command into $dlcache/sbin..."
 
     if [ $majorver -ge 7 ]; then
-       pkgtool="pkgtools"
+      pkgtool="pkgtools"
+      pkgtool=$( cd $dlcache ; ls "$pkgtool"* )
+      pkgtool=${pkgtool%%-*}
     else
-       pkgtool="hdsetup"
-       LANG=C
+      pkgtool="hdsetup"
+      LANG=C
     fi
 
     ( cd $dlcache ; tar xpJf "$pkgtool"-*.txz ; rm -rf tmp usr var )
+    if [ $pkgtool = "pkgtools${majorver}" ]; then
+	( cd $dlcache/sbin ; mv installer_new installer )
+    fi
 
     sed -i "/ldconfig/!s@/sbin@$dlcache&@g" $dlcache/sbin/installpkg*
     PATH=$dlcache/sbin:$PATH


More information about the lxc-devel mailing list