X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=grml-live;h=4a683017682e68535174b18b73480bcad16a83d7;hp=75b1b6ec7a32741660f120b4b3e682f0f16fb3c9;hb=fb6d43045e8a03c6f0ca00228f4b0b493393bd66;hpb=9102cb3dd4bcae6033e74c2a4a9b28bea438e833 diff --git a/grml-live b/grml-live index 75b1b6e..4a68301 100755 --- a/grml-live +++ b/grml-live @@ -12,6 +12,9 @@ export LANG=C export LC_ALL=C +# avoid leaking into chroots +unset TMPDIR + # define function getfilesize before "set -e" if stat --help >/dev/null 2>&1; then getfilesize='stat -c %s' # GNU stat @@ -330,10 +333,15 @@ while getopts "a:C:c:d:D:e:g:i:I:o:r:s:t:U:v:AbBFhnNqQuVz" opt; do U) CHOWN_USER="$OPTARG" ;; V) VERBOSE="-v" ;; z) SQUASHFS_ZLIB=1 ;; - ?) echo "invalid option -$OPTARG" >&2; bailout 1 ;; + ?) echo "invalid option -$OPTARG" >&2; usage; bailout 1 ;; esac done shift $(($OPTIND - 1)) # set ARGV to the first not parsed commandline parameter + +if [ -n "$1" ] ; then + echo "Error: unknown argument '$1' in options. Exiting to avoid possible data loss." >&2 + bailout 1 +fi # }}} # read local (non-packaged) configuration {{{ @@ -464,7 +472,8 @@ if [ -z "$FORCE" ] ; then read a if ! [ "$a" = 'y' -o "$a" = 'Y' ] ; then CLEAN_ARTIFACTS=0 - bailout 1 "Exiting as requested." + echo "Exiting as requested." + exit 0 fi echo fi @@ -1212,7 +1221,7 @@ fi # create md5sum file: if [ -z "$BOOTSTRAP_ONLY" ] ; then ( cd $BUILD_OUTPUT/GRML/"${GRML_NAME}" && - find .. -type f -not -name md5sums -not -name isolinux.bin -exec md5sum {} \; > md5sums ) + find ../.. -type f -not -name md5sums -not -name isolinux.bin -exec md5sum {} \; > md5sums ) fi # }}}