File: preinst

package info (click to toggle)
cfingerd 1.4.3-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 968 kB
  • sloc: ansic: 3,776; perl: 501; makefile: 137; sh: 73
file content (21 lines) | stat: -rw-r--r-- 531 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /bin/sh
# pre install script for the Debian GNU/Linux cfingerd package

set -e

if [ "$1" = "upgrade" ]; then
    case $2 in
    1.2*)
	if [ -f /etc/cfingerd.conf ]; then
	    test -d /etc/cfingerd || mkdir /etc/cfingerd
	    cp /etc/cfingerd.conf /etc/cfingerd/saved.cfingerd.conf
	    echo "Old /etc/cfingerd.conf saved as /etc/cfingerd/saved.cfingerd.conf"
	fi
	;;
    esac
    if `dpkg --compare-versions $2 lt 1.3.2-8`; then
	for f in uptime ping; do
	    cp /etc/cfingerd/scripts/$f /etc/cfingerd/saved.$f
	done
    fi
fi