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
|