Revision 24389,
937 bytes
checked in by jdreed, 14 years ago
(diff) |
In recovery-mode-config:
* Reboot, don't poweroff, after renumbering
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | |
---|
3 | # Blatantly stolen from the installer |
---|
4 | ask() { |
---|
5 | answer='' |
---|
6 | while [ y != "$answer" -a n != "$answer" ]; do |
---|
7 | echo -n "$1" |
---|
8 | read answer |
---|
9 | [ Y = answer ] && answer=y |
---|
10 | [ N = answer ] && answer=n |
---|
11 | [ -z "$answer" ] && answer=$2 |
---|
12 | done |
---|
13 | } |
---|
14 | |
---|
15 | if [ "$1" = "test" ]; then |
---|
16 | echo "Force an update of the workstation" |
---|
17 | exit 0 |
---|
18 | fi |
---|
19 | |
---|
20 | # Unload kexec here, in case auto-updater wants to reboot |
---|
21 | # (We really don't want cluster machines ending up back in recovery-mode) |
---|
22 | [ -x "/sbin/kexec" ] && /sbin/kexec -u |
---|
23 | echo "Running auto-updater, please wait..." |
---|
24 | /usr/sbin/athena-auto-update |
---|
25 | if [ $? != 0 ]; then |
---|
26 | echo "Something went wrong. Press Enter to return to the menu." |
---|
27 | read dummy |
---|
28 | exit 0 |
---|
29 | fi |
---|
30 | ask "You are strongly encouraged to reboot. Reboot now? (y/n) " y |
---|
31 | if [ "$answer" = "y" ]; then |
---|
32 | echo "OK, rebooting..." |
---|
33 | /sbin/reboot |
---|
34 | fi |
---|
35 | echo "Please reboot as soon as possible. Press Enter to return to the menu." |
---|
36 | read dummy |
---|
Note: See
TracBrowser
for help on using the repository browser.