source: trunk/debathena/config/recovery-mode-config/debian/athena-update @ 25599

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 *
Line 
1#!/bin/sh
2
3# Blatantly stolen from the installer
4ask() {
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
15if [ "$1" = "test" ]; then
16  echo "Force an update of the workstation"
17  exit 0
18fi
19
20# Precise mounts root read-only in recovery mode.
21mount -o remount,rw /
22
23. /usr/share/debathena-recovery-mode-config/require_network.sh
24
25echo "Testing networking, please wait..."
26if ! 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
32fi
33
34echo "Running auto-updater, please wait..."
35/usr/sbin/athena-auto-update -n -v
36if [ $? != 0 ]; then
37    echo "Something went wrong.  Press Enter to return to the menu."
38    read dummy
39    exit 0
40fi
41# We can just return to the menu and resume boot once LP:436936 gets fixed
42ask "The workstation needs to be rebooted.  Do that now? (Y/n) " y
43if [ "$answer" = "y" ]; then
44    /sbin/reboot
45fi
46echo "Please reboot as soon as possible.  Press Enter to return to the menu."
47read dummy
48exit 0
Note: See TracBrowser for help on using the repository browser.