Commit b09ecaf3 by Daniel Lezcano Committed by Daniel Lezcano

Fix paths in the lxc-busybox template

Author of the patch : Jonathan Liu <???> posted as a bug fix on the lxc sourceforge website. OS: Arch Linux 32-bit /etc/init.d/rcS do not use full path to syslogd, mount and udhcpc executables. As busybox requires /proc mounted if CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" to run these commands without full path, the full path should be used in the startup script as /proc is mounted later in the script. It also fails to start the machine if /lib64 does not exist on the host system as there is a mount entry for /lib64 in the config. The attached patch changes commands in /etc/init.d/rcS to use full path and adds a check for /lib64 on host before adding lib64 mount entries to config. Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent 3244e750
...@@ -78,9 +78,9 @@ EOF ...@@ -78,9 +78,9 @@ EOF
# mount everything # mount everything
cat <<EOF >> $rootfs/etc/init.d/rcS cat <<EOF >> $rootfs/etc/init.d/rcS
#!/bin/sh #!/bin/sh
syslogd /bin/syslogd
mount -a /bin/mount -a
udhcpc /bin/udhcpc
EOF EOF
# executable # executable
...@@ -242,7 +242,7 @@ lxc.mount.entry=/usr/lib $rootfs/usr/lib none ro,bind 0 0 ...@@ -242,7 +242,7 @@ lxc.mount.entry=/usr/lib $rootfs/usr/lib none ro,bind 0 0
EOF EOF
fi fi
if [ -d "$rootfs/lib64" ]; then if [ -d "/lib64" ] && [ -d "$rootfs/lib64" ]; then
cat <<EOF >> $path/config cat <<EOF >> $path/config
lxc.mount.entry=/lib64 $rootfs/lib64 none ro,bind 0 0 lxc.mount.entry=/lib64 $rootfs/lib64 none ro,bind 0 0
lxc.mount.entry=/usr/lib64 $rootfs/usr/lib64 none ro,bind 0 0 lxc.mount.entry=/usr/lib64 $rootfs/usr/lib64 none ro,bind 0 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment