summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-11-26 11:30:00 +0100
committerErich Eckner <git@eckner.net>2016-11-26 11:30:00 +0100
commit159a8a6fabf5da3af88d6eda7bbac070392b66ca (patch)
tree809051d8fe628e91c2e082fe17b0236dd64f99db
parent3c8bc655326b209973e7f87015694d88f917e260 (diff)
downloadmakekernel-159a8a6fabf5da3af88d6eda7bbac070392b66ca.tar.xz
check if called from terminal -> su needs this
-rw-r--r--makekernel.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/makekernel.in b/makekernel.in
index 61b915b..023f22b 100644
--- a/makekernel.in
+++ b/makekernel.in
@@ -38,6 +38,13 @@ then
exit 1
fi
+if ! stty &> /dev/null
+then
+ >&2 echo 'ERROR: Must be called from a terminal! Closing.'
+ >&2 echo 'Did you forget "-t" for ssh?'
+ exit 1
+fi
+
eval set -- "$(
getopt -o ac:s \
--long allowDownload \