File: preinst

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 (34 lines) | stat: -rw-r--r-- 680 bytes parent folder | download | duplicates (4)
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

case "$1" in
	install|upgrade)
		;;
	abort-upgrade)
		exit 0
		;;
	*)
		echo "$0: unknown action \"$1\""
		exit 0
		;;
esac

#
# Fix a bug in 1.06.1-4 and maybe other UUCP versions.
# If there is a "callout" file but no "call" file, and the
# configuration is not overridden, rename the "callout" file to "call".
#

# If there is a "call" file already never mind.
[ -f /etc/uucp/call ] && exit 0

# Is there a "callout" file ?
[ ! -f /etc/uucp/callout ] && exit 0

# Is the callout file defined in "config" ?
grep -qs '^callfile' /etc/uucp/config && exit 0

# /etc/uucp/callout is present and not overridden, so rename it.
mv /etc/uucp/callout /etc/uucp/call

exit 0