1 &  ***********************************************************
 2 &  *                                                         *
 3 &  * Copyright, (C) Honeywell Information Systems Inc., 1984 *
 4 &  *                                                         *
 5 &  ***********************************************************
 6 &command_line off
 7 &- ec to handle returning to bce
 8 &- Keith Loepere, January 1984.
 9 &-
10 &if [not [get_flagbox call_bce]] &then &goto non_call_entry
11 &-
12 &print bce invoked via hphcs_$call_bce.
13 &-
14 &if [not [query "Should normal recovery procedures be used?"]] &then &goto abort_auto_mode
15 &-
16 &label non_call_entry
17 &-
18 &- look at the state of things
19 &-
20 &if [not [get_flagbox ssenb]] &then &goto ss_not_enabled
21 &-
22 &- storage system enabled; take a dump and esd
23 &-
24 exec_com dump
25 &-
26 &if [nequal [severity dump] 0] &then &goto dump_okay
27 &-
28 &print Dump failed.
29 &goto abort_auto_mode
30 &-
31 &label dump_okay
32 &-
33 emergency_shutdown
34 &- return from above is back at rtb
35 &-
36 &label ss_not_enabled
37 &-
38 &- Is everything okay?
39 &-
40 &if [nequal [shutdown_state] 4] &then &goto okay_shutdown
41 &-
42 &if [nequal [shutdown_state] 3] &then &print Shutdown with locks set.
43 &else &print Error during shutdown.
44 &goto abort_auto_mode
45 &-
46 &label okay_shutdown
47 &-
48 &- normal shutdown - see if we should reboot
49 &-
50 &if [not [get_flagbox unattended]] &then &goto abort_auto_mode
51 &if [not [get_flagbox auto_reboot]] &then &goto abort_auto_mode
52 &if [get_flagbox booting] &then &goto system_cant_boot
53 &-
54 set_flagbox rebooted true
55 &-
56 &- inform a.s. that we are doing an automatic reboot
57 &-
58 exec_com auto star
59 &quit
60 &-
61 &label system_cant_boot
62 &-
63 &print System crashed during boot.
64 &-
65 &label abort_auto_mode
66 &-
67 set_flagbox bce_command ""
68 set_flagbox auto_reboot false
69 set_flagbox rebooted false
70 &quit