Commit 8e40069c authored by Vitaly Lipatov's avatar Vitaly Lipatov

loginhsh: skip interactive shell when no tty available

parent 96e5d7d0
......@@ -172,5 +172,10 @@ if [ -n "$SHARENETWORK" ] ; then
$HSH-run $HASHERDIR --rooter -- sh -c 'cat >/etc/resolv.conf' </etc/resolv.conf
fi
if ! tty -s ; then
echog "No tty available, skipping interactive shell"
exit
fi
echog "You are in hasher shell"
docmd $HSH-shell $HASHERDIR $SHELLHASHERARG $ROOTER --wait-lock --shell
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment