X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=fb8562c470ef02da3135f965d74f56b64eb53b46;hp=16f02b2ee66b6381394e9897603e39564f95c0eb;hb=0d2a5662aaf112fa1ed76b4d715b72efa26f075a;hpb=17695f75820fc982acc48acff837cb7e60de1bae diff --git a/grml-debootstrap b/grml-debootstrap index 16f02b2..fb8562c 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Filename: grml-debootstrap # Purpose: wrapper around debootstrap for installing plain Debian via Grml # Authors: grml-team (grml.org), (c) Michael Prokop @@ -82,7 +82,7 @@ Send bugreports to the grml-team: bugs (at) grml.org || http://grml.org/bugs/ " } -if [ "$1" = '-h' ] || [ "$1" = '-help' ] ; then +if [ "$1" = '-h' ] || [ "$1" = '-help' ] || [ "$1" = "--help" ] ; then usage echo 'Please notice that this script requires root permissions!' exit 0 @@ -91,7 +91,6 @@ fi # make sure we have what we need {{{ check4progs debootstrap dialog || exit 1 -check4root || exit 1 # }}} # source main configuration file {{{ @@ -166,6 +165,13 @@ fi } # }}} +# check for root permissions {{{ +if ! check4root ; then + echo "For usage instructions please execute '$PN --help'." + exit 1 +fi +# }}} + # source specified configuration file {{{ if [ -n "$CONFIGFILE" ] ; then einfo "Reading specified config file $CONFIGFILE."