From 37b0d5204f0536c0b86587c6c0881af70ff3cb7d Mon Sep 17 00:00:00 2001 From: xor Date: Sun, 4 Oct 2015 20:46:31 +0200 Subject: [PATCH 1/2] 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 () From 55be3b45fd11d90700d685829d8c30f6123a32e0 Mon Sep 17 00:00:00 2001 From: xor Date: Sun, 4 Oct 2015 20:51:56 +0200 Subject: [PATCH 2/2] -hmpf --- hashboot | 7 ------- 1 file changed, 7 deletions(-) diff --git a/hashboot b/hashboot index 871b254..b3dc601 100755 --- a/hashboot +++ b/hashboot @@ -26,13 +26,6 @@ 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 () {