# License: This file is licensed under the GPL v2 or any later version.
################################################################################
# License: This file is licensed under the GPL v2 or any later version.
################################################################################
# make sure we have the sbin directories in our PATH to find grml2usb ootb
PATH="${PATH}:/sbin:/usr/local/sbin:/usr/sbin"
# adjust variables if necessary through environment {{{
# path to the grml2usb script you'd like to use
# make sure we have the sbin directories in our PATH to find grml2usb ootb
PATH="${PATH}:/sbin:/usr/local/sbin:/usr/sbin"
# adjust variables if necessary through environment {{{
# path to the grml2usb script you'd like to use
- [ -n "$GRML2USB" ] || GRML2USB='grml2usb'
-# work directory for creating the filesystem
- [ -n "$TMPDIR" ] && WRKDIR="${TMPDIR}/grml2iso.tmp"
- [ -n "$WRKDIR" ] || WRKDIR='/tmp/grml2iso.tmp'
+[ -n "$GRML2USB" ] || GRML2USB='grml2usb'
+
# support mkisofs as well as genisoimage
if which xorriso >/dev/null 2>&1 ; then
MKISOFS='xorriso -as mkisofs'
# support mkisofs as well as genisoimage
if which xorriso >/dev/null 2>&1 ; then
MKISOFS='xorriso -as mkisofs'
restrictions in the bootprocess only IPs are allowed.
Supported protocols are: http and ftp
-t Directory Directory that should be used for temporary files
restrictions in the bootprocess only IPs are allowed.
Supported protocols are: http and ftp
-t Directory Directory that should be used for temporary files
Will generate a file small.iso which tries to download the squashfs file from
http://192.168.23.42:8000/grml/ - the squashfs file is placed in the same
Will generate a file small.iso which tries to download the squashfs file from
http://192.168.23.42:8000/grml/ - the squashfs file is placed in the same
-# create necessary stuff under WRKDIR {{{
- [ -d "$WRKDIR" ] && WRKDIR_EXISTED='true' || WRKDIR_EXISTED='false'
+# ensure to properly set up working directory {{{
+ WRKDIR_EXISTED='false'
+ if [ -z "$WRKDIR" ] ; then
+ WRKDIR="$(mktemp -d)"
+ else
+ [ -d "$WRKDIR" ] && WRKDIR_EXISTED='true'
+ fi
+
+ GRML2USB_OPTS+=(--tmpdir="$WRKDIR")
+