summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkensmith <kensmith@FreeBSD.org>2008-12-15 15:46:56 +0000
committerkensmith <kensmith@FreeBSD.org>2008-12-15 15:46:56 +0000
commitdd1f772713e5200b7cdf4444e9498267399a06c1 (patch)
tree1cd9ddd36fe44aa82dad797fc39528e4d79bc52a
parentf0e837432d62958c713c7e6ebbb2adc52c8fd696 (diff)
downloadFreeBSD-src-dd1f772713e5200b7cdf4444e9498267399a06c1.zip
FreeBSD-src-dd1f772713e5200b7cdf4444e9498267399a06c1.tar.gz
Don't tell the user to remove the media until its actually possible for
them to remove the media. CDs need to be unmounted before they can be removed.
-rw-r--r--usr.sbin/sysinstall/main.c3
-rw-r--r--usr.sbin/sysinstall/system.c9
2 files changed, 8 insertions, 4 deletions
diff --git a/usr.sbin/sysinstall/main.c b/usr.sbin/sysinstall/main.c
index 2920380..36e8f68 100644
--- a/usr.sbin/sysinstall/main.c
+++ b/usr.sbin/sysinstall/main.c
@@ -201,8 +201,7 @@ main(int argc, char **argv)
#if defined(__sparc64__)
|| !msgNoYes("Are you sure you wish to exit? The system will halt.")
#else
- || !msgNoYes("Are you sure you wish to exit? The system will reboot\n"
- "(be sure to remove any floppies/CDs/DVDs from the drives).")
+ || !msgNoYes("Are you sure you wish to exit? The system will reboot.")
#endif
)
break;
diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c
index 4ee6e4f..19307d5 100644
--- a/usr.sbin/sysinstall/system.c
+++ b/usr.sbin/sysinstall/system.c
@@ -235,8 +235,13 @@ void
systemShutdown(int status)
{
/* If some media is open, close it down */
- if (status >=0)
- mediaClose();
+ if (status >=0) {
+ if (mediaDevice != NULL && mediaDevice->type == DEVICE_TYPE_CDROM) {
+ mediaClose();
+ msgConfirm("Be sure to remove the media from the drive.");
+ } else
+ mediaClose();
+ }
/* write out any changes to rc.conf .. */
configRC_conf();
OpenPOWER on IntegriCloud