This file is indexed.

prerm is in micro-httpd 20051212-15.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/sh

set -e

PATH="/sbin:/bin:/usr/sbin:/usr/bin"
PACKAGE=$(basename $0 | sed 's/\..*//')
pkgdir=/usr/share/$PACKAGE
conf=/etc/inetd.conf
port="www"
entry=

Debhelper ()
{
    :
    
}

Which ()
{
    which "$1" > /dev/null 2>&1
}

Die ()
{
    echo "$0: $*" >&2
    exit 1
}

IsInetd ()
{
    [ -x /usr/sbin/update-inetd ]
}

IsInetdConf ()
{
    [ -f $conf ]
}

InetdName ()
{
    local name=

    if [ -f /etc/init.d/inetutils-inetd ]; then
	name=inetutils-inetd
    elif [ -f /etc/init.d/openbsd-inetd ]; then
        name="openbsd-inetd"
    elif [ -f /etc/init.d/rlinetd ]; then
        name="rlinetd"
    fi

    [ ! "$name" ] || echo $name
}

CallInetd ()
{
    local name=$1
    local cmd=$2

    [ "$cmd" ] || return 0

    if Which invoke-rc.d ; then
	invoke-rc.d $name $cmd
    else
	/etc/init.d/$name $cmd
    fi
}

MainInetd ()
{
    if [ "$1" = "remove" ]; then

	echo "$0: removing $conf entry" >&2
	update-inetd --group STANDARD --remove "$port.*$PACKAGE"

	local name=$(InetdName)

	CallInetd $name reload
    fi
}

Main ()
{
    if IsInetd ; then
	MainInetd "$@"
    fi

    Debhelper
}

Main "$@"

# End of file