File: bootlogd.postrm

package info (click to toggle)
sysvinit 3.15-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,900 kB
  • sloc: ansic: 8,530; sh: 3,827; makefile: 351
file content (33 lines) | stat: -rw-r--r-- 622 bytes parent folder | download | duplicates (6)
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
#!/bin/sh
set -e

INITSCRIPTS="bootlogd stop-bootlogd-single stop-bootlogd"

case "$1" in
    purge)
	#
	# Remove log files
	#
	for f in boot boot.0 boot.1.gz boot.2.gz boot.3.gz boot.4.gz ; do
		rm -f "/var/log/${f}"
	done

	# Remove rc symlinks in the reverse dependency order they were
	# inserted
	for F in $INITSCRIPTS; do
		REVERSE="$F $REVERSE"
	done
	for F in $REVERSE; do
		update-rc.d $F remove >/dev/null || exit $?
	done

	for F in $INITSCRIPTS; do
		SERVICE="$(basename $F .sh).service"
		if [ -L /etc/systemd/system/$SERVICE ]; then
			rm /etc/systemd/system/$SERVICE
		fi
	done
        ;;
esac

#DEBHELPER#