diff options
author | jhb <jhb@FreeBSD.org> | 2002-06-03 19:39:28 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2002-06-03 19:39:28 +0000 |
commit | 35664255192dc45706c519e9230f3bf20367fa3f (patch) | |
tree | 1ced4a2f7c62f6edbdfe5015f4bd1e1ff6022e96 /usr.sbin | |
parent | 1b3b69c6ec2172ac00b8b913d3d73499e8933cb8 (diff) | |
download | FreeBSD-src-35664255192dc45706c519e9230f3bf20367fa3f.zip FreeBSD-src-35664255192dc45706c519e9230f3bf20367fa3f.tar.gz |
Add a 'mediaClose' script command to close the open media. An example use
would be to unmount the CD you installed from and prompt the user to
eject it before rebooting the machine.
Sponsored by: The Weather Channel
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/sade/dispatch.c | 9 | ||||
-rw-r--r-- | usr.sbin/sade/sade.8 | 5 | ||||
-rw-r--r-- | usr.sbin/sysinstall/dispatch.c | 9 | ||||
-rw-r--r-- | usr.sbin/sysinstall/sysinstall.8 | 5 |
4 files changed, 28 insertions, 0 deletions
diff --git a/usr.sbin/sade/dispatch.c b/usr.sbin/sade/dispatch.c index 04cd77c..2aa3fa9 100644 --- a/usr.sbin/sade/dispatch.c +++ b/usr.sbin/sade/dispatch.c @@ -45,6 +45,7 @@ static int dispatch_shutdown(dialogMenuItem *unused); static int dispatch_systemExecute(dialogMenuItem *unused); static int dispatch_msgConfirm(dialogMenuItem *unused); +static int dispatch_mediaClose(dialogMenuItem *unused); static struct _word { char *name; @@ -94,6 +95,7 @@ static struct _word { { "installVarDefaults", installVarDefaults }, { "loadConfig", dispatch_load_file }, { "loadFloppyConfig", dispatch_load_floppy }, + { "mediaClose", dispatch_mediaClose }, { "mediaSetCDROM", mediaSetCDROM }, { "mediaSetFloppy", mediaSetFloppy }, { "mediaSetDOS", mediaSetDOS }, @@ -206,6 +208,13 @@ dispatch_msgConfirm(dialogMenuItem *unused) } static int +dispatch_mediaClose(dialogMenuItem *unused) +{ + mediaClose(); + return DITEM_SUCCESS; +} + +static int call_possible_resword(char *name, dialogMenuItem *value, int *status) { int i, rval; diff --git a/usr.sbin/sade/sade.8 b/usr.sbin/sade/sade.8 index 55eca6b..1915960 100644 --- a/usr.sbin/sade/sade.8 +++ b/usr.sbin/sade/sade.8 @@ -715,6 +715,11 @@ configuration file from another. .It configFile The fully qualified pathname of the file to load. .El +.It mediaClose +If a media device is open, close it. +.Pp +.Sy Variables : +None .It mediaSetCDROM Select a .Fx diff --git a/usr.sbin/sysinstall/dispatch.c b/usr.sbin/sysinstall/dispatch.c index 04cd77c..2aa3fa9 100644 --- a/usr.sbin/sysinstall/dispatch.c +++ b/usr.sbin/sysinstall/dispatch.c @@ -45,6 +45,7 @@ static int dispatch_shutdown(dialogMenuItem *unused); static int dispatch_systemExecute(dialogMenuItem *unused); static int dispatch_msgConfirm(dialogMenuItem *unused); +static int dispatch_mediaClose(dialogMenuItem *unused); static struct _word { char *name; @@ -94,6 +95,7 @@ static struct _word { { "installVarDefaults", installVarDefaults }, { "loadConfig", dispatch_load_file }, { "loadFloppyConfig", dispatch_load_floppy }, + { "mediaClose", dispatch_mediaClose }, { "mediaSetCDROM", mediaSetCDROM }, { "mediaSetFloppy", mediaSetFloppy }, { "mediaSetDOS", mediaSetDOS }, @@ -206,6 +208,13 @@ dispatch_msgConfirm(dialogMenuItem *unused) } static int +dispatch_mediaClose(dialogMenuItem *unused) +{ + mediaClose(); + return DITEM_SUCCESS; +} + +static int call_possible_resword(char *name, dialogMenuItem *value, int *status) { int i, rval; diff --git a/usr.sbin/sysinstall/sysinstall.8 b/usr.sbin/sysinstall/sysinstall.8 index 55eca6b..1915960 100644 --- a/usr.sbin/sysinstall/sysinstall.8 +++ b/usr.sbin/sysinstall/sysinstall.8 @@ -715,6 +715,11 @@ configuration file from another. .It configFile The fully qualified pathname of the file to load. .El +.It mediaClose +If a media device is open, close it. +.Pp +.Sy Variables : +None .It mediaSetCDROM Select a .Fx |