X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Fscripts%2Frootshell;h=5eae0bfe425568ddd3af9776fc959aedf9cb5e31;hb=c574f33e210c3438945209d685c218c51f74cbaa;hp=7586d460fd8ebf47e39db601156810e46f37e74e;hpb=da691fd4bad5e187b307b7fd86bf5fd61e47c3fc;p=util-vserver.git diff --git a/util-vserver/scripts/rootshell b/util-vserver/scripts/rootshell index 7586d46..5eae0bf 100755 --- a/util-vserver/scripts/rootshell +++ b/util-vserver/scripts/rootshell @@ -16,11 +16,13 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +: ${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" -echo $* >/tmp/log -OPTIONS=$@ -if [ "$OPTIONS" = "" ] ; then - OPTIONS=--login -fi -exec /usr/sbin/chbind --silent --ip 0.0.0.0 /bin/bash $OPTIONS +test "$*" || set -- --login +exec $SBINDIR/chbind --silent --ip 0.0.0.0 /bin/bash "$@"