X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=scripts%2Fvserver.functions;h=908f0fcee65efd9e9ae8984639eb09cb6295e8e1;hb=e6580882caefa10d48e7668d879b52d80b87a6b2;hp=cd0cccdc5aa1ceebe02a041741cfafdb66237d16;hpb=07a3904f8220fbc4d12d85fb45bc44eeefc3d6ae;p=util-vserver.git diff --git a/scripts/vserver.functions b/scripts/vserver.functions index cd0cccd..908f0fc 100644 --- a/scripts/vserver.functions +++ b/scripts/vserver.functions @@ -299,7 +299,27 @@ function _generateInitOptions ;; (xgentoo) - panic "init-style '$INITSTYLE' is no longer supported; please use plain instead; aborting";; + test -n "$RUNLEVEL_START" || RUNLEVEL_START="default" + + 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) ;; (*) panic "Unknown init-style '$INITSTYLE'; aborting";;