X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=debian-pxe-preseed;h=31a038a052a59a969f84e9deda6a406b3f0037a2;hb=ba2a6b887fe5a9ed627e9f0947265b37abbcf7aa;hp=c2a2087cc683c4d441c48230199840a97593d2f1;hpb=d6df8985152a6c17523cedc3fee62694544eeaf2;p=automated-distro-installer diff --git a/debian-pxe-preseed b/debian-pxe-preseed index c2a2087..31a038a 100755 --- a/debian-pxe-preseed +++ b/debian-pxe-preseed @@ -16,10 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -cleanup() { :; } -set -eE -o pipefail -trap 'cleanup; echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR - +x="$(readlink -f "$BASH_SOURCE")"; source "${x%/*}/bash-trace" [[ $EUID == 0 ]] || exec sudo "$BASH_SOURCE" "$@" @@ -30,6 +27,7 @@ e() { echo "$*"; "$@"; } mount_dir=$(mktemp -d) cleanup() { cd; umount -f $mount_dir; } +_errcatch_cleanup=cleanup e mount -o users wrt:/mnt/usb $mount_dir