From: Enrico Scholz Date: Fri, 28 Oct 2005 18:41:32 +0000 (+0000) Subject: use new syntax for '--rescue-cmd' X-Git-Tag: version_0_30_210~80 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b002bb47b4c5a6fdba1c24e1852ab2efc2c6600;p=util-vserver.git use new syntax for '--rescue-cmd' git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2201 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/scripts/vserver.start b/util-vserver/scripts/vserver.start index 6d347ce..a46b3f1 100644 --- a/util-vserver/scripts/vserver.start +++ b/util-vserver/scripts/vserver.start @@ -71,16 +71,30 @@ is_mounted= is_vshelper_init= have_interfaces= startsync_pipe= +have_initcmd= while test "$#" -gt 0; do case "$1" in (--rescue) INITSTYLE=rescue;; - (--rescue-cmd) INITCMD_RESCUE=( $2 ); shift;; - (*) panic $"vserver ... start: unknown option '$1'";; + (--rescue-cmd) + warning $"\ +The '--rescue-cmd' option is deprecated; just add the the initcmd +inclusive its arguments to the cmdline." + INITCMD_RESCUE=( $2 ); + have_initcmd=1 + shift;; + (--) shift; break;; + (-*) panic $"vserver ... start: unknown option '$1'";; + (*) break; esac shift done +if test x"$INITSTYLE" = xrescue -a -z "$have_initcmd" -a "$#" -gt 0; then + INITCMD_RESCUE=( "$@" ) +fi + + set -e trap "cleanup" EXIT