mirror of
https://git.yoctoproject.org/poky
synced 2026-03-16 20:29:41 +01:00
mkefidisk.sh: Add signal handling
Add basic signal handling to unmount and remove any temporary files. Correct a quoting issue with the die() function caught testing signal handling. Fix a minor typo in "formatting" output. (From OE-Core rev: a085cdf0e2dcf6543f61a8bdf68f83bcf8006373) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
ce3857994a
commit
cfa23a21d4
@@ -48,6 +48,8 @@ cleanup() {
|
||||
fi
|
||||
}
|
||||
|
||||
trap 'die "Signal Received, Aborting..."' HUP INT TERM
|
||||
|
||||
# Logging routines
|
||||
WARNINGS=0
|
||||
ERRORS=0
|
||||
@@ -71,7 +73,7 @@ success() {
|
||||
echo "${GREEN}$1${CLEAR}"
|
||||
}
|
||||
die() {
|
||||
error $1
|
||||
error "$1"
|
||||
cleanup
|
||||
exit 1
|
||||
}
|
||||
@@ -288,7 +290,7 @@ unmount_device || die "Failed to unmount $DEVICE partitions"
|
||||
#
|
||||
# Format $DEVICE partitions
|
||||
#
|
||||
info "Formating partitions"
|
||||
info "Formatting partitions"
|
||||
debug "Formatting $BOOTFS as vfat"
|
||||
if [ ! "${DEVICE#/dev/loop}" = "${DEVICE}" ]; then
|
||||
mkfs.vfat -I $BOOTFS -n "EFI" >$OUT 2>&1 || die "Failed to format $BOOTFS"
|
||||
|
||||
Reference in New Issue
Block a user