From 7579654afabf6a996464647e54187f262d230aa8 Mon Sep 17 00:00:00 2001 From: Benedikt Boehm Date: Fri, 15 Sep 2006 20:15:01 +0000 Subject: [PATCH] make vserver-wrapper gentoo compliant git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2316 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- scripts/vserver-wrapper | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/vserver-wrapper b/scripts/vserver-wrapper index ccbd2e1..2e4df9f 100755 --- a/scripts/vserver-wrapper +++ b/scripts/vserver-wrapper @@ -29,15 +29,23 @@ test -n "$MARK" || MARK=default if test -e /etc/init.d/functions; then . /etc/init.d/functions + _beginResult() { echo -n "$@"; } lockfile=/var/lock/subsys/$LOCKFILE +elif test -e /etc/gentoo-release; then + . /sbin/functions.sh + _beginResult() { ebegin "$@"; } + success() { eend "$@"; } + passed() { eend "$@"; } + failure() { eend "$@"; } + lockfile=/var/lock/vservers/$LOCKFILE else + _beginResult() { echo -n "$@"; } success() { echo .; } passed() { echo .; } failure() { echo ERROR; } lockfile=/var/run/$LOCKFILE fi - function _tellResult() { local rc=$1 @@ -52,7 +60,7 @@ function _tellResult() function start() { - echo -n $"Starting vservers of type '$MARK'..." + _beginResult $"Starting vservers of type '$MARK'..." $_START_VSERVERS -m "$MARK" -j "$NUMPARALLEL" --all --start _tellResult $? local rc=$? @@ -62,7 +70,7 @@ function start() function stop() { - echo -n $"Stopping vservers of type '$MARK'..." + _beginResult $"Stopping vservers of type '$MARK'..." $_START_VSERVERS -m "$MARK" -j "$NUMPARALLEL" --all --stop _tellResult $? local rc=$? -- 1.8.1.5