made 'nodev' work
[util-vserver.git] / util-vserver / scripts / start-vservers
index 182a8eb..2844d47 100755 (executable)
@@ -19,7 +19,7 @@
 
 : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
 test -e "$UTIL_VSERVER_VARS" || {
-    echo "Can not find util-vserver installation; aborting..." >&2
+    echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
     exit 1
 }
 . "$UTIL_VSERVER_VARS"
@@ -118,10 +118,6 @@ okfile=$(mktemp     /tmp/vserver-init.XXXXXX)
 passedfile=$(mktemp /tmp/vserver-init.XXXXXX)
 trap "rm -rf $makedir $resultfile $passedfile" EXIT
 
-defaulttty="$CONFDIR/.defaults/apps/init/tty"
-test -c "$defaulttty" || defaulttty=$(tty)
-test -c "$defaulttty" || defaulttty=/dev/null
-
 test_cmd=false
 case "$OPTION_FLAVOR" in
     start)     test_cmd="${_VSERVER}   --silent '\$*' status";;
@@ -130,11 +126,10 @@ esac
 
 {
     cat <<EOF
-TTY = ${defaulttty}
 .%.stamp:
 ${TAB}$test_cmd || { \
 ${TAB}echo -n '.' >>$passedfile ; \
-${TAB}$_VSERVER --sync ${OPTION_DEBUG:+--debug} "\$*" ${OPTION_FLAVOR} >\$(TTY) 2>\$(TTY) <\$(TTY) ; }
+${TAB}$_VSERVER --defaulttty --sync ${OPTION_DEBUG:+--debug} "\$*" ${OPTION_FLAVOR}; }
 ${TAB}echo -n '.' >>$okfile
 ${TAB}@touch "\$@"
 EOF
@@ -153,9 +148,6 @@ for i in "${vservers[@]}"; do
     cat "$d"/depends
 done | sort -u | while read vserver; do
     d=$CONFDIR/$vserver/apps/init
-    test ! -e $d/tty || {
-       echo -e ".$vserver.stamp:\tTTY=$d/tty" >>$makedir/Makefile
-    }
 
     case "$OPTION_FLAVOR" in
        start)