X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=debian-pxe-preseed;h=a3ed886b51655afc6e1c892d76a54d317d6e4090;hp=c2a2087cc683c4d441c48230199840a97593d2f1;hb=45578de750fb07f7a7f64181e6b3b749ef727725;hpb=7f77555b3d92709034fe41919358053c650c71e1 diff --git a/debian-pxe-preseed b/debian-pxe-preseed index c2a2087..a3ed886 100755 --- a/debian-pxe-preseed +++ b/debian-pxe-preseed @@ -16,10 +16,9 @@ # 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 +# WARNING: outdated! needs docs and update to debian-stretch +x="$(readlink -f "$BASH_SOURCE")"; source "${x%/*}/bash-trace" [[ $EUID == 0 ]] || exec sudo "$BASH_SOURCE" "$@" @@ -30,6 +29,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