- When we run our trap cleanup handler, echo that we are running this
handler to make it more clear why we are 'suddenly' running df, umount, and mdconfig. - Remove trap handler again after we have unconfigured the memory device etc. Before we could end up running the trap handler if a later stage failed, which was a bit confusing and not really useful. MFC after: 2 weeks
This commit is contained in:
parent
14a0f03de2
commit
3d5812a230
@ -439,7 +439,7 @@ create_i386_diskimage ( ) (
|
||||
-y ${NANO_HEADS}`
|
||||
fi
|
||||
|
||||
trap "df -i ${MNT} ; umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT
|
||||
trap "echo 'Running exit trap code' ; df -i ${MNT} ; umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT
|
||||
|
||||
fdisk -i -f ${NANO_OBJ}/_.fdisk ${MD}
|
||||
fdisk ${MD}
|
||||
@ -491,6 +491,9 @@ create_i386_diskimage ( ) (
|
||||
echo "Writing out _.disk.image..."
|
||||
dd if=/dev/${MD}s1 of=${NANO_DISKIMGDIR}/_.disk.image bs=64k
|
||||
mdconfig -d -u $MD
|
||||
|
||||
trap - 1 2 15 EXIT
|
||||
|
||||
) > ${NANO_OBJ}/_.di 2>&1
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user