Make the gentoo initstyle work with baselayout-vserver.
authorDaniel Hokka Zakrisson <daniel@hozac.com>
Mon, 26 Feb 2007 20:18:03 +0000 (20:18 +0000)
committerDaniel Hokka Zakrisson <daniel@hozac.com>
Mon, 26 Feb 2007 20:18:03 +0000 (20:18 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2509 94cd875c-1c1d-0410-91d2-eb244daf1a30

distrib/gentoo/init-vserver.sh
scripts/vserver.functions

index 12fcda9..e628d9f 100644 (file)
@@ -24,6 +24,7 @@
 # You have been warned...
 #
 
-RUNLEVEL=1 /sbin/rc sysinit
-/sbin/rc boot
+RUNLEVEL=1 /sbin/rc sysinit || exit 1
+/sbin/rc boot || exit 1
 /sbin/rc ${1:-default}
+exit 0
index c9d9a47..7ddeb47 100644 (file)
@@ -306,21 +306,6 @@ function _generateInitOptions
            INITCMD_START=( /lib/rcscripts/sh/init-vserver.sh "$RUNLEVEL_START" )
            INITCMD_STOP=( /sbin/rc shutdown )
            INITCMD_PREPARE=( $_FAKE_RUNLEVEL 3 /var/run/utmp )
-
-           pushd "$vdir"/vdir &>/dev/null
-           basever=$($_CHROOT_SH cat /etc/gentoo-release | $_AWK '{print $5}')
-           popd &>/dev/null
-
-           basemaj=${basever/.*}
-           basemin=${basever#*.}
-           basemin=${basemin/.*}
-
-           test "$basemaj" -lt 1 -o "$basemin" -lt 13 && \
-           panic "\
-Using init-style 'gentoo' requires >=baselayout-1.13 inside the vserver!
-
-Your vserver ($(basename "$vdir")) seems to have baselayout-$basever,
-please use 'plain' init-style instead!"
            ;;
 
        (x) ;;