From: martin f. krafft Date: Sat, 19 Apr 2008 13:22:35 +0000 (+0200) Subject: do not fail if called noninteractively X-Git-Tag: 0.4~3 X-Git-Url: https://git.madduck.net/code/molly-guard.git/commitdiff_plain/9b298025360993e9836b5abf41ca27469fb044de?ds=sidebyside do not fail if called noninteractively --- diff --git a/run.d/30-ask-hostname b/run.d/30-ask-hostname index 6e33fe1..70b18d9 100755 --- a/run.d/30-ask-hostname +++ b/run.d/30-ask-hostname @@ -19,10 +19,7 @@ for arg in "$@"; do done # require an interactive terminal connected to stdin -if ! test -t 0; then - echo "E: $ME: not connected to a terminal." - exit 1 -fi +test -t 0 || exit 0 # we've been asked to always protect this host if [ ${ALWAYS_QUERY_HOSTNAME:-0} -eq 1 ]; then