Revision 25599,
1.2 KB
checked in by jdreed, 12 years ago
(diff) |
In recovery-mode-config:
* Ensure / is mounted read-write (Trac: #1153)
|
-
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 | |
---|
[25599] | 20 | # Precise mounts root read-only in recovery mode. |
---|
| 21 | mount -o remount,rw / |
---|
| 22 | |
---|
[25023] | 23 | . /usr/share/debathena-recovery-mode-config/require_network.sh |
---|
| 24 | |
---|
| 25 | echo "Testing networking, please wait..." |
---|
| 26 | if ! require_network; then |
---|
| 27 | echo "Can't verify that networking is available. If you continue," |
---|
| 28 | ask "errors may occur. Continue? (y/N) " n |
---|
| 29 | if [ "$answer" = "n" ]; then |
---|
| 30 | exit 0 |
---|
| 31 | fi |
---|
| 32 | fi |
---|
| 33 | |
---|
[24348] | 34 | echo "Running auto-updater, please wait..." |
---|
[25071] | 35 | /usr/sbin/athena-auto-update -n -v |
---|
[24388] | 36 | if [ $? != 0 ]; then |
---|
| 37 | echo "Something went wrong. Press Enter to return to the menu." |
---|
| 38 | read dummy |
---|
| 39 | exit 0 |
---|
| 40 | fi |
---|
[25023] | 41 | # We can just return to the menu and resume boot once LP:436936 gets fixed |
---|
| 42 | ask "The workstation needs to be rebooted. Do that now? (Y/n) " y |
---|
[24388] | 43 | if [ "$answer" = "y" ]; then |
---|
[25023] | 44 | /sbin/reboot |
---|
[24388] | 45 | fi |
---|
[25023] | 46 | echo "Please reboot as soon as possible. Press Enter to return to the menu." |
---|
[24388] | 47 | read dummy |
---|
[25023] | 48 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.