From 37b0d5204f0536c0b86587c6c0881af70ff3cb7d Mon Sep 17 00:00:00 2001 From: xor Date: Sun, 4 Oct 2015 20:46:31 +0200 Subject: [PATCH] interactive? --- hashboot | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hashboot b/hashboot index c5d5358..f91a1ae 100755 --- a/hashboot +++ b/hashboot @@ -26,6 +26,12 @@ BOOT_MOUNTED=0 CONFIG_FILE="/etc/hashboot.cfg" COUNTER=0 +if [[ -t "$fd" || -p /dev/stdin ]] +then + INTERACTIVE=1 +else + INTERACTIVE=0 +fi #Umount /boot if we mounted it, exit with given exit code die ()