Date: Sun, 27 Sep 2009 21:01:07 +0000 (UTC) From: "Simon L. Nielsen" <simon@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r197542 - head/tools/tools/nanobsd Message-ID: <200909272101.n8RL17Kd034461@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: simon Date: Sun Sep 27 21:01:07 2009 New Revision: 197542 URL: http://svn.freebsd.org/changeset/base/197542 Log: - 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 Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- head/tools/tools/nanobsd/nanobsd.sh Sun Sep 27 20:50:54 2009 (r197541) +++ head/tools/tools/nanobsd/nanobsd.sh Sun Sep 27 21:01:07 2009 (r197542) @@ -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 )
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909272101.n8RL17Kd034461>