X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=debian-pxe-preseed;h=31a038a052a59a969f84e9deda6a406b3f0037a2;hp=c2a2087cc683c4d441c48230199840a97593d2f1;hb=d29d21017de635db1d05769144db56f44addd055;hpb=645ab36988f8eed2e85d066bdf1ad8a12e7aabc0 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