File: prerm

package info (click to toggle)
uucp 1.06.1-9
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 4,000 kB
  • ctags: 2,994
  • sloc: ansic: 52,080; sh: 3,837; makefile: 634; perl: 199
file content (40 lines) | stat: -rw-r--r-- 846 bytes parent folder | download | duplicates (2)
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
#! /bin/sh

case "$1" in
	remove|upgrade|remove-in-favour|deconfigure-in-favour)
		;;
	failed-upgrade)
		# If the upgrade failed, restore as much as possible.
       		crontab -u news /etc/uucp/crontab
        	echo "Upgrade failed!"
        	exit 0
		;;
	*)
		echo "$0: unknown action \"$1\""
		exit 0
		;;
esac

# Kill all running UUCP sessions.
killall -9 uucico 2>/dev/null

# Remove crontab so that nothing gets run during installation
echo "Removing crontab for uucp.."
crontab -u uucp -l 2>/dev/null | tail +4 > /etc/uucp/crontab.tmp
if [ -s /etc/uucp/crontab.tmp ]
then
	cp /etc/uucp/crontab.tmp /etc/uucp/crontab
fi
rm /etc/uucp/crontab.tmp
crontab -u uucp -r

# If we are upgrading don't remove logfiles and stuff.
if [ "$1" = upgrade ]
then
        exit 0
fi

echo "Removing logfiles in /var/log/uucp.."
rm -rf /var/log/uucp/*

exit 0