X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Fscripts%2Fvsysvwrapper;h=93bc8a33b8cf531da7d5a035c5c772784c6ca783;hb=c574f33e210c3438945209d685c218c51f74cbaa;hp=309a9d1043d2c82179ea93df16e400c645bdc2b0;hpb=da691fd4bad5e187b307b7fd86bf5fd61e47c3fc;p=util-vserver.git diff --git a/util-vserver/scripts/vsysvwrapper b/util-vserver/scripts/vsysvwrapper index 309a9d1..93bc8a3 100755 --- a/util-vserver/scripts/vsysvwrapper +++ b/util-vserver/scripts/vsysvwrapper @@ -18,9 +18,16 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Helper script for all the v_xxx scripts -USR_SBIN=/usr/sbin +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars} +test -e "$UTIL_VSERVER_VARS" || { + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2 + exit 1 +} +. "$UTIL_VSERVER_VARS" + if [ $# = 0 ] ; then echo vsysvwrapper service_name >&2 + exit 6 else SERVICE=$1 shift @@ -33,8 +40,6 @@ else do IPOPT="$IPOPT --ip $oneip" done - echo exec $USR_SBIN/chbind $IPOPT /etc/init.d/$SERVICE $* - exec $USR_SBIN/chbind $IPOPT /etc/init.d/$SERVICE $* + echo exec $SBINDIR/chbind $IPOPT /etc/init.d/$SERVICE "$@" + exec $SBINDIR/chbind $IPOPT /etc/init.d/$SERVICE "$@" fi - -