File: afbackup-client.preinst

package info (click to toggle)
afbackup 3.3.8.1beta2-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,128 kB
  • ctags: 3,370
  • sloc: ansic: 46,932; sh: 4,654; tcl: 4,199; makefile: 536; csh: 416; perl: 133; sed: 93
file content (51 lines) | stat: -rw-r--r-- 903 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh -e

fix_cruft ()
{
   cat <<.EOF
If you get asked to overwrite your old configuration, please do so! You
can easily reconfigure your system with afserverconfig or
xafserverconfig. The existing status information will not be touched.
.EOF
}

ask_abort ()
{
   cat <<.EOF
You are upgrading from an incompatible version of afbackup-client. You
have to upgrade all your machines to the current version of afbackup and
afbackup-client or you should abort upgrading now.

Do you want to abort? (y/N)
.EOF
   read ANSWER
   case "$ANSWER" in
      y|Y)
	 exit 1
      ;;
   esac
}
      

case "$1" in
    upgrade)
	case "$2" in
	    2.6*)
	        fix_cruft
		ask_abort
	    ;;
	    2*|3.1*|3.3.[1-6]*)
	        ask_abort
	    ;;
        esac    	
    ;;

    install|abort-upgrade)
    ;;

    *)
        echo "preinst called with unknown argument \`$1'" >&2
        exit 0
    ;;
esac
#DEBHELPER#