gentooup: do not use --ask if no tty is present

This commit is contained in:
layman 2018-01-11 12:11:48 +01:00
parent 0781d09bea
commit 6d91a39c1e

View file

@ -18,7 +18,14 @@ trap int_handler INT TERM EXIT
STARTDATE="$(date -Iseconds)"
if [[ -x /etc/cron.daily/porticron ]] ; then
echo "porticron"
echo "porticron detected! -> skipping --ask"
PORTAGE_ASK=""
fi
if [[ ! -t 1 ]] ; then
echo "No tty connected! -> skipping --ask"
echo "Waiting 10s for manual abortion..."
sleep 10
PORTAGE_ASK=""
fi