$! SHUTDOWN_MENU.COM $! $! Command procedure to execute scripted shutdown procedures $! $! Date: 09-Jun-93 $! $ @TASM$COM:TASM_MENUSYM ! Define common menu symbols $ GOTO SKIP_CNTRLY $!---------------------------------------------------------------- $! $! Control Y was press if we got to this routine. $! Put this here so there is FAST response to ^Y $! $!---------------------------------------------------------------- $CNTRLY: $ TYPE TASM$COM:TASM_MENU_ABORT.MSG $ EXIT $! $SKIP_CNTRLY: $! $! This is the new MENU command file which will allow the system $! manager to do things even if he has never read the manual. $! $ ON CONTROL_Y THEN GOTO CNTRLY $ GOTO MENU_NOWAIT $! $! Enter here, if you do not want the text on the screen to disappear $! $ MAIN_MENU: $ SAY "" $ INQUIRE/NOPUNCT DUMMY " Press [return] for main menu" $! $MENU_NOWAIT: $ MENU_ENTRIES = 6 $ SAY CLS $ TYPE SYS$INPUT S H U T D O W N M E N U 1 - RETURN - Return to previous menu 2 - REBOOT - Shutdown now with immediate reboot 3 - REBOOT5 - Shutdown in 5 minutes, with immediate reboot 4 - NORMAL - Shutdown now without reboot 5 - NORMAL5 - Shutdown in 5 minutes, without reboot 6 - POWEROFF - Shutdown, prepare for shut off power $! $ INQUIRE/NOPUNCT NUMBER "Enter a number: " $ IF NUMBER .EQS. "" THEN EXIT $ N = F$INTEGER(NUMBER) $ IF ((N.LT.1).OR.(N.GT.MENU_ENTRIES)) THEN GOTO MM_ERROR $ IF N .EQ. 1 THEN GOTO DO_1 $ SAY CLS $ INQUIRE/NOPUNCT YESNO "Are you sure you want to SHUTDOWN the system [NO]? " $ IF F$EDIT(F$EXTRACT(0,1,YESNO),"UPCASE")- .NES. "Y" THEN GOTO MAIN_MENU $ GOTO DO_'F$STRING(N)' $! $! An incorrect answer has been entered if here. $! $ MM_ERROR: $ TYPE TASM$COM:TASM_MENU_INPERR.MSG $ GOTO MAIN_MENU $!-------------------------------------------------------------------- $! $! We have received a valid entry $! $!-------------------------------------------------------------------- $! $! $DO_1: $ EXIT $! $DO_2: $ @SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN NO YES LATER YES NONE $ GOTO MENU_NOWAIT $! $DO_3: $! $ @SYS$SYSTEM:SHUTDOWN 5 SHUTDOWN NO YES LATER YES NONE $ GOTO MENU_NOWAIT $! $DO_4: $ @SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN NO YES LATER NO NONE $ GOTO MENU_NOWAIT $! $DO_5: $ @SYS$SYSTEM:SHUTDOWN 5 SHUTDOWN NO YES LATER NO NONE $ GOTO MENU_NOWAIT $! $DO_6: $ @SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN YES YES LATER NO NONE $ GOTO MENU_NOWAIT