File: sysv-rc.postrm

package info (click to toggle)
sysvinit 2.88dsf-59
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,300 kB
  • ctags: 1,736
  • sloc: ansic: 7,096; sh: 3,883; perl: 371; makefile: 315
file content (37 lines) | stat: -rwxr-xr-x 711 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
#! /bin/sh
#
# sysv-rc postrm
#

set -e

case "$1" in
	remove) : ;;
	purge)
	    if [ -e /usr/share/debconf/confmodule ]; then
		. /usr/share/debconf/confmodule
		db_purge
	    fi
	    exit 0
	    ;;
	*) exit 0 ;;
esac

umask 022

# If an alternative update-rc.d and invoke-rc.d implementation is
# unpacked before this postrm script is executed, we do not want to
# replace their programs with the symlink.
if [ ! -e /usr/sbin/update-rc.d ] ; then
    ln -sf /usr/share/sysvinit/update-rc.d /usr/sbin/update-rc.d
fi
if [ ! -e /usr/sbin/invoke-rc.d ] ; then
    ln -sf /usr/share/sysvinit/update-rc.d /usr/sbin/invoke-rc.d
fi

#DEBHELPER#

# Remove the recorded update-rc.d
rm -f /var/lib/update-rc.d/*

exit 0