Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148412294
D55450.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D55450.diff
View Options
diff --git a/release/release.sh b/release/release.sh
--- a/release/release.sh
+++ b/release/release.sh
@@ -40,10 +40,27 @@
VERSION=3
# Prototypes that can be redefined per-chroot or per-target.
+
+# load_chroot_env(): Set up the build environment needed.
+#
+# Done as part of chroot_env().
load_chroot_env() { }
+
+# load_target_env(): set up the build environment needed for the
+# chroot_build_target() and `${chroot_build_release}` steps.
load_target_env() { }
+
+# buildenv_setup(): set up the build environment needed for post-chroot_setup()
buildenv_setup() { }
+# chroot_cleanup(): Clean up resources setup in chroot_setup() at exit.
+#
+# This function can be built upon. `_chroot_cleanup` must be added to the end of
+# the override function, if overridden.
+chroot_cleanup() {
+ _chroot_cleanup
+} # chroot_cleanup()
+
usage() {
echo "Usage: $0 [-c release.conf]"
exit 1
@@ -427,6 +444,18 @@
return 0
} # chroot_arm_build_release()
+# chroot_cleanup(): Clean up resources setup in chroot_setup() at exit.
+#
+# This contains steps which must be executed at exit.
+#
+# Do not override this function: override `chroot_cleanup instead.
+_chroot_cleanup() {
+ if [ -c "${CHROOTDIR}/dev/null" ]; then
+ echo "Unmounting /dev in ${CHROOTDIR}"
+ umount -f "${CHROOTDIR}/dev"
+ fi
+}
+
# main(): Start here.
main() {
set -e # Everything must succeed
@@ -451,7 +480,7 @@
fi
fi
env_check
- trap "umount ${CHROOTDIR}/dev" EXIT # Clean up devfs mount on exit
+ trap chroot_cleanup INT EXIT TERM
chroot_setup
extra_chroot_setup
chroot_build_target
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 18, 4:43 PM (17 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28965831
Default Alt Text
D55450.diff (1 KB)
Attached To
Mode
D55450: release.sh: add chroot cleanup routine
Attached
Detach File
Event Timeline
Log In to Comment