File: preinst

package info (click to toggle)
afbackup 3.3.6pl4-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,872 kB
  • ctags: 3,143
  • sloc: ansic: 44,316; tcl: 4,189; sh: 2,263; csh: 2,077; makefile: 566; sed: 93; perl: 80
file content (34 lines) | stat: -rw-r--r-- 797 bytes parent folder | download | duplicates (5)
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
#!/bin/sh -e

case "$1" in
    install)
	exit 0
    ;;
    upgrade)
	case "$2" in
	    2.6*)
	        echo "Removing superfluous /etc/services entry !"
		if grep -q "#-- afbackup begin" /etc/services; then
		    TEMP=`tempfile`
		    cat /etc/services >> $TEMP
		    sed -e '/#-- afbackup begin/,/#-- afbackup end/d' <$TEMP >/etc/services
		    rm $TEMP
		fi
		echo "If you get asked to overwrite your old configuration, please do so !"
		echo "You can easily reconfigure your system with afserverconfig or xafserverconfig."
		echo "The existing status information won't be touched :-)"
	     ;;
        esac    	
        # continue below
    ;;

    abort-upgrade)
        exit 0
    ;;

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