summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2013-11-17 17:48:55 +0000
committerdteske <dteske@FreeBSD.org>2013-11-17 17:48:55 +0000
commit358285463c565493afc8a42a72a8e0f93ad0e1fe (patch)
tree2613a28053cf40fe91a42762f08b064eb9545dba /usr.sbin
parentf5e406a2b5dea405db2ad5d0f9c9a63b66293f45 (diff)
downloadFreeBSD-src-358285463c565493afc8a42a72a8e0f93ad0e1fe.zip
FreeBSD-src-358285463c565493afc8a42a72a8e0f93ad0e1fe.tar.gz
Always shutdown the media when we're exiting the packages module (prevents
errors on re-entry for physical media). Also, while we're here, stop ejecting the CDROM when we're done with it (but leave the functions for later use so that we could perhaps -- from the installer standpoint -- use it to eject the media after an install). MFC after: 3 days
Diffstat (limited to 'usr.sbin')
-rwxr-xr-xusr.sbin/bsdconfig/packages/packages2
-rw-r--r--usr.sbin/bsdconfig/share/media/cdrom.subr5
2 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/bsdconfig/packages/packages b/usr.sbin/bsdconfig/packages/packages
index 5b01c3e..586079f 100755
--- a/usr.sbin/bsdconfig/packages/packages
+++ b/usr.sbin/bsdconfig/packages/packages
@@ -38,6 +38,7 @@ BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
+f_include $BSDCFG_SHARE/media/common.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/packages/packages.subr
@@ -73,6 +74,7 @@ f_device_get_all
#
# Display the package configuration menu and exit
#
+trap 'f_media_close' EXIT
f_package_config
################################################################################
diff --git a/usr.sbin/bsdconfig/share/media/cdrom.subr b/usr.sbin/bsdconfig/share/media/cdrom.subr
index c59f88a..7f8b523 100644
--- a/usr.sbin/bsdconfig/share/media/cdrom.subr
+++ b/usr.sbin/bsdconfig/share/media/cdrom.subr
@@ -163,8 +163,7 @@ f_media_get_cdrom()
# f_media_shutdown_cdrom $device
#
-# Shuts down the CDROM device and ejects the media using f_media_eject_cdrom(),
-# below. Return status should be ignored.
+# Shuts down the CDROM device. Return status should be ignored.
#
f_media_shutdown_cdrom()
{
@@ -184,8 +183,6 @@ f_media_shutdown_cdrom()
else
CDROM_MOUNTED=
fi
-
- f_media_eject_cdrom "$dev"
}
# f_media_eject_cdrom $device
OpenPOWER on IntegriCloud