Revision 24395,
991 bytes
checked in by jdreed, 14 years ago
(diff) |
In recovery-mode-config:
* Remove "really-reboot", because it doesn't actually workaround kexec,
because kexec sucks
* Revert to shutting down after updates and renumbers, because kexec
sucks
* Call athena-auto-update with new (as of 1.15) -n option to ensure it
won't reboot and end up back in recovery-mode, because kexec sucks
|
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[24348] | 1 | #!/bin/sh |
---|
| 2 | |
---|
[24388] | 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 | |
---|
[24348] | 15 | if [ "$1" = "test" ]; then |
---|
| 16 | echo "Force an update of the workstation" |
---|
| 17 | exit 0 |
---|
| 18 | fi |
---|
| 19 | |
---|
[24395] | 20 | # Unloading kexec doesn't work, awesome. Use new -n option to prevent |
---|
| 21 | # auto-update from rebooting |
---|
[24348] | 22 | echo "Running auto-updater, please wait..." |
---|
[24395] | 23 | /usr/sbin/athena-auto-update -n |
---|
[24388] | 24 | if [ $? != 0 ]; then |
---|
| 25 | echo "Something went wrong. Press Enter to return to the menu." |
---|
| 26 | read dummy |
---|
| 27 | exit 0 |
---|
| 28 | fi |
---|
[24395] | 29 | ask "The workstation needs to be shut down and rebooted. Do that now? (y/n) " y |
---|
[24388] | 30 | if [ "$answer" = "y" ]; then |
---|
[24395] | 31 | echo "The workstation will now shut down. You can then turn it back on." |
---|
| 32 | echo "(Press Enter to continue)" |
---|
| 33 | ready dummy |
---|
| 34 | /sbin/poweroff |
---|
[24388] | 35 | fi |
---|
[24395] | 36 | echo "Please shut down as soon as possible. Press Enter to return to the menu." |
---|
[24388] | 37 | read dummy |
---|
Note: See
TracBrowser
for help on using the repository browser.