File: preinst

package info (click to toggle)
xisp 2.5p4-1
  • links: PTS
  • area: contrib
  • in suites: slink
  • size: 1,328 kB
  • ctags: 1,908
  • sloc: ansic: 16,648; asm: 214; sh: 210; makefile: 202; perl: 55
file content (47 lines) | stat: -rw-r--r-- 1,362 bytes parent folder | download
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
#!/bin/sh -e

case "$1" in 
  upgrade)
    if [ -f /etc/options.xisp ] ; then
      conffile="/etc/options.xisp"
    else
      conffile="/etc/ppp/options.xisp"
    fi
    if [ -f $conffile  ] ; then
      origMD5=`dpkg -s xisp | grep $conffile | sed 's/^.* \([^ ]*\)$/\1/'`
      curMD5=`md5sum $conffile | sed 's/^\([^ ]*\) .*$/\1/'`

      if [ -z "$origMD5" -o -z "$curMD5" ]; then
# Assume that /etc/ppp/options.xisp is left over from
# two or more installs ago
        cat >&2 <<EOT

$conffile is left on your system, however the 
version of xisp being replaced didn't use it. You should probably
delete $conffile; if it contains local edits which you wish to
incorporate into your current xisp setup, read
/usr/doc/xisp/README.peersfiles.

EOT
     exit 0
     fi
     if [ "$origMD5" = "$curMD5" ]; then
# no change, can safely delete it
	rm $conffile
     else
        cat >&2 <<EOT

$conffile is left on your system, containing local edits. 
Xisp now respects the "auth" option in /etc/ppp/options, but to
archieve this, it has to use different option files. Therefore, it
doesn't use $conffile any more. Since you have made 
changes to the file, it was not deleted automaticaly. Read
/usr/doc/xisp/README.peersfiles for info how to incorperate your
options into the new setup, then delete
/usr/doc/xisp/README.peersfiles

EOT
     fi
   fi
   ;;
esac