From 1ac306fc7a51d46f1c39be210357f5d3f255de67 Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Sun, 11 Feb 2007 20:21:48 +0000 Subject: [PATCH 1/1] Work better if the default tty is a file by using /dev/null for input and appending the output. git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2496 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- scripts/functions | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/functions b/scripts/functions index 0edb7a3..aa5f9ce 100644 --- a/scripts/functions +++ b/scripts/functions @@ -713,8 +713,12 @@ function setDefaultTTY "$__CONFDIR/.defaults/apps/init/tty" \ $2 /dev/null - exec <$ttyname - exec &>$ttyname + if test -f "$ttyname"; then + exec >$ttyname } ## Usage: killContext [] -- 1.8.1.5