From 74d51c8c3e18a8b6738aff0c6f7ff706fd70eaa6 Mon Sep 17 00:00:00 2001 From: Adrian Dudau Date: Thu, 26 Jun 2014 13:57:02 +0200 Subject: initial commit for Enea Linux 4.0 Migrated from the internal git server on the daisy-enea branch Signed-off-by: Adrian Dudau --- .../lxc-busybox-support-enea-linux-init.patch | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 recipes-containers/lxc/files/lxc-busybox-support-enea-linux-init.patch (limited to 'recipes-containers/lxc/files/lxc-busybox-support-enea-linux-init.patch') diff --git a/recipes-containers/lxc/files/lxc-busybox-support-enea-linux-init.patch b/recipes-containers/lxc/files/lxc-busybox-support-enea-linux-init.patch new file mode 100644 index 0000000..4eecfaa --- /dev/null +++ b/recipes-containers/lxc/files/lxc-busybox-support-enea-linux-init.patch @@ -0,0 +1,51 @@ +lxc: Modify lxc-busybox to support Enea Linux + +In Enea Linux, the busybox commands are split between busybox.nosuid (symlinked +as /bin/busybox) and busybox.suid. This patch enables the commands provided by +the latter and also replaces the busybox init with the SysV counterpart. + +Upstream-Status: Pending + +Signed-off-by: Petre Pircalabu + +--- a/templates/lxc-busybox.in ++++ b/templates/lxc-busybox.in +@@ -129,6 +129,7 @@ EOF + # and propose a shell on the tty, the last one is + # not needed + cat <> $rootfs/etc/inittab ++id:5:initdefault: + ::sysinit:/etc/init.d/rcS + tty1::respawn:/bin/getty -L tty1 115200 vt100 + console::askfirst:/bin/sh +@@ -209,8 +210,28 @@ configure_busybox() + xargs -n1 ln -s busybox + popd > /dev/null + +- # relink /sbin/init +- ln $rootfs/bin/busybox $rootfs/sbin/init ++ which busybox.suid >/dev/null 2>&1 ++ ++ if [ $? -eq 0 ]; then ++ # copy busybox.suid in the rootfs ++ cp $(which busybox.suid) $rootfs/bin ++ if [ $? -ne 0 ]; then ++ echo "failed to copy busybox.suid in the rootfs" ++ return 1 ++ fi ++ ++ pushd $rootfs/bin > /dev/null || return 1 ++ ./busybox.suid --help | grep 'Currently defined functions:' -A300 | \ ++ grep -v 'Currently defined functions:' | tr , '\n' | \ ++ xargs -n1 ln -s busybox.suid ++ popd > /dev/null ++ fi ++ ++ # use SysV init ++ pushd $rootfs/sbin > /dev/null || return 1 ++ cp /sbin/init.sysvinit . ++ ln -s init.sysvinit init ++ popd > /dev/null + + # passwd exec must be setuid + chmod +s $rootfs/bin/passwd -- cgit v1.2.3-54-g00ecf