X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=debian-pxe-preseed;h=31a038a052a59a969f84e9deda6a406b3f0037a2;hb=e6c8a36522847eca91819ab3eb656dd824bc3e3c;hp=f97319451cbcc9352c1fdfbad32ba816e6c36ac8;hpb=23bf2f3666becf9d3c219af1eaea08b4cf843492;p=automated-distro-installer diff --git a/debian-pxe-preseed b/debian-pxe-preseed index f973194..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 @@ -44,4 +42,4 @@ e ln -s debian-wheezy tftpboot cd / e umount $mount_dir -e $src/pxe-server -p plain # my script +e $src/pxe-server default plain # my script