mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
MFC: r197542:
- 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
4018626f75
commit
e55b9df7b3
1 changed files with 4 additions and 1 deletions
|
|
@ -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 a new issue