- If "installpkg" command does not exist, lxc-plamo temporarily
install the command with static linked tar command into the lxc
cache directory. The tar command does not refer to passwd/group
files, which means that only a few files/directories are extracted
with wrong user/group ownership. To avoid this, the installpkg
command now uses the standard tar command in the system.
- Change mode to 666 for $rootfs/dev/null to allow write access for
all users.
- Small fix in usage message.
Signed-off-by: TAMUKI Shoichi <tamuki@linet.gr.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
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*
+ sed -i "/^TAR=/s@tar@`which tar`@g" $dlcache/sbin/installpkg2
PATH=$dlcache/sbin:$PATH
fi
echo "Installing packages to $rtcache..."
configure_plamo() {
# create /dev
+ chmod 666 $rootfs/dev/null
mknod -m 666 $rootfs/dev/zero c 1 5
chmod 666 $rootfs/dev/random
mknod -m 666 $rootfs/dev/urandom c 1 9
usage() {
cat <<- EOF
$prog [-h|--help] -p|--path=<path> -n|--name=<name> --rootfs=<rootfs>
- [--clean] [-r|--release=<release>] [-a|--arch=<arch>]
+ [-c|--clean] [-r|--release=<release>] [-a|--arch=<arch>]
[-b|--bindhome=<user>]
release: $release
arch: x86 or x86_64: defaults to host arch