]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
Added exec dependency to root in create-grml-squash.sh
authorFrank Brehm <frank.brehm@profitbricks.com>
Wed, 30 Apr 2014 08:00:27 +0000 (10:00 +0200)
committerFrank Brehm <frank.brehm@profitbricks.com>
Wed, 30 Apr 2014 08:00:27 +0000 (10:00 +0200)
create-grml-squash.sh

index c6a870d38157c099a9c2ec82b12629b82a056857..40e36c7f35bf733463b86e887c79ef4f888f8a40 100755 (executable)
@@ -427,6 +427,12 @@ create_squashfs() {
 main() {
 
     do_getopt "$@"
+
+    if [[ "${EUID}" != "0" ]] ; then
+        echo "You must be root to execute this script." >&2
+        exit 1
+    fi
+
     unpack_orig
 
     mangle_resolv_conf