diff options
-rwxr-xr-x | scripts/contrib/mkefidisk.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh index 28cfb6dd54..b96b7d4f7d 100755 --- a/scripts/contrib/mkefidisk.sh +++ b/scripts/contrib/mkefidisk.sh | |||
@@ -48,6 +48,8 @@ cleanup() { | |||
48 | fi | 48 | fi |
49 | } | 49 | } |
50 | 50 | ||
51 | trap 'die "Signal Received, Aborting..."' HUP INT TERM | ||
52 | |||
51 | # Logging routines | 53 | # Logging routines |
52 | WARNINGS=0 | 54 | WARNINGS=0 |
53 | ERRORS=0 | 55 | ERRORS=0 |
@@ -71,7 +73,7 @@ success() { | |||
71 | echo "${GREEN}$1${CLEAR}" | 73 | echo "${GREEN}$1${CLEAR}" |
72 | } | 74 | } |
73 | die() { | 75 | die() { |
74 | error $1 | 76 | error "$1" |
75 | cleanup | 77 | cleanup |
76 | exit 1 | 78 | exit 1 |
77 | } | 79 | } |
@@ -288,7 +290,7 @@ unmount_device || die "Failed to unmount $DEVICE partitions" | |||
288 | # | 290 | # |
289 | # Format $DEVICE partitions | 291 | # Format $DEVICE partitions |
290 | # | 292 | # |
291 | info "Formating partitions" | 293 | info "Formatting partitions" |
292 | debug "Formatting $BOOTFS as vfat" | 294 | debug "Formatting $BOOTFS as vfat" |
293 | if [ ! "${DEVICE#/dev/loop}" = "${DEVICE}" ]; then | 295 | if [ ! "${DEVICE#/dev/loop}" = "${DEVICE}" ]; then |
294 | mkfs.vfat -I $BOOTFS -n "EFI" >$OUT 2>&1 || die "Failed to format $BOOTFS" | 296 | mkfs.vfat -I $BOOTFS -n "EFI" >$OUT 2>&1 || die "Failed to format $BOOTFS" |