fixed http://savannah.nongnu.org/bugs/?func=detailitem&item_id=11570:
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Fri, 21 Jan 2005 13:51:04 +0000 (13:51 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Fri, 21 Jan 2005 13:51:04 +0000 (13:51 +0000)
  "vserver myvserver start" gives exit code 1 if there is no file
  /etc/vservers/myvserver.sh, since the last statement in vserver
  ("test -x /etc/vservers/$1.sh && ...") evaluates to 1 in this case.

  [Daniel Hermann]

git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1789 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/scripts/legacy/vserver

index 9c328b7..7c72d04 100755 (executable)
@@ -534,7 +534,7 @@ elif [ "$2" = "start" ] ; then
                        $_SAVE_S_CONTEXT $PKGSTATEDIR/$1.ctx \
                        $_CAPCHROOT $CHROOTOPT . $STARTCMD
                sleep 2
-               test -x $CONFDIR/$1.sh && $CONFDIR/$1.sh post-start $1
+               test ! -x $CONFDIR/$1.sh || $CONFDIR/$1.sh post-start $1
        fi
 elif [ "$2" = "running" ] ; then
        if [ ! -f $PKGSTATEDIR/$1.ctx ] ; then