Author: dteske
Date: Sun Nov 17 17:48:55 2013
New Revision: 258266
URL: http://svnweb.freebsd.org/changeset/base/258266

Log:
  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

Modified:
  head/usr.sbin/bsdconfig/packages/packages
  head/usr.sbin/bsdconfig/share/media/cdrom.subr

Modified: head/usr.sbin/bsdconfig/packages/packages
==============================================================================
--- head/usr.sbin/bsdconfig/packages/packages   Sun Nov 17 17:42:15 2013        
(r258265)
+++ head/usr.sbin/bsdconfig/packages/packages   Sun Nov 17 17:48:55 2013        
(r258266)
@@ -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
 
 
################################################################################

Modified: head/usr.sbin/bsdconfig/share/media/cdrom.subr
==============================================================================
--- head/usr.sbin/bsdconfig/share/media/cdrom.subr      Sun Nov 17 17:42:15 
2013        (r258265)
+++ head/usr.sbin/bsdconfig/share/media/cdrom.subr      Sun Nov 17 17:48:55 
2013        (r258266)
@@ -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
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to