1
0
mirror of https://github.com/lxc/lxc-templates.git synced 2024-12-22 14:30:31 +00:00

Merge pull request #34 from tenforward/plamo

plamo: Support current pkgtools
This commit is contained in:
Christian Brauner 2020-09-03 11:03:48 +02:00 committed by GitHub
commit a4b2383cd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,13 +123,18 @@ install_plamo() {
echo "Installing 'installpkg' command into $dlcache/sbin..." echo "Installing 'installpkg' command into $dlcache/sbin..."
if [ $majorver -ge 7 ]; then if [ $majorver -ge 7 ]; then
pkgtool="pkgtools" pkgtool="pkgtools"
pkgtool=$( cd $dlcache ; ls "$pkgtool"* )
pkgtool=${pkgtool%%-*}
else else
pkgtool="hdsetup" pkgtool="hdsetup"
LANG=C LANG=C
fi fi
( cd $dlcache ; tar xpJf "$pkgtool"-*.txz ; rm -rf tmp usr var ) ( 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* sed -i "/ldconfig/!s@/sbin@$dlcache&@g" $dlcache/sbin/installpkg*
PATH=$dlcache/sbin:$PATH PATH=$dlcache/sbin:$PATH