~ubuntu-branches/ubuntu/maverick/micro-httpd/maverick

« back to all changes in this revision

Viewing changes to debian/micro-httpd.prerm

  • Committer: Bazaar Package Importer
  • Author(s): Jari Aalto
  • Date: 2009-08-08 23:00:55 UTC
  • Revision ID: james.westby@ubuntu.com-20090808230055-hq4o63y4q5lb11x2
Tags: 20051212-11
* debian/compat: update to 7.
* debian/control
  - (Build-Depends): update debhelper 7.
  - (Section): change web to httpd as per
    http://news.gmane.org/find-root.php?message_id=%3c87r60yiwu7.fsf%40vorlon.ganneff.de%3e
  - (Standards-Version): Update to 3.8.2.
* debian/micro-httpd.postinst
  - (entry): Check for port name 'http'; do not run as root, but
    nobody:www-data (Closes: #517705).
  - (InetdName): No default value (Closes: #535203).
* debian/micro-httpd.prerm
  - (InetdName): No default value.
* debian/rules
  - (install): add dh_lintian.
* debian/*.8
  - Delete. Generated from *.pod.
* debian/*.mk
  - Update variables and make macros.
* debian/*.overrides
  - update-inetd is not called without checks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
port="www"
10
10
entry=
11
11
 
 
12
Debhelper ()
 
13
{
 
14
    :
 
15
    #DEBHELPER#
 
16
}
 
17
 
12
18
Die ()
13
19
{
14
20
    echo "$0: $*" >&2
20
26
    [ -x /usr/sbin/update-inetd ]
21
27
}
22
28
 
23
 
Debhelper ()
 
29
IsInetdConf ()
24
30
{
25
 
    :
26
 
    #DEBHELPER#
 
31
    [ -f $conf ]
27
32
}
28
33
 
29
34
InetdName ()
30
35
{
31
 
    name=inetd
 
36
    local name=
32
37
 
33
 
    if [ -f /etc/init.d/openbsd-inetd ]; then
 
38
    if [ -f /etc/init.d/inetutils-inetd ]; then
 
39
        name=inetutils-inetd
 
40
    elif [ -f /etc/init.d/openbsd-inetd ]; then
34
41
        name="openbsd-inetd"
35
42
    elif [ -f /etc/init.d/rlinetd ]; then
36
43
        name="rlinetd"
37
44
    fi
38
45
 
39
 
    echo $name
 
46
    [ ! "$name" ] || echo $name
40
47
}
41
48
 
42
49
MainInetd ()
45
52
 
46
53
        echo "$0: removing $conf entry" >&2
47
54
        update-inetd --group STANDARD --remove "$port.*$PACKAGE"
48
 
        invoke-rc.d $(InetdName) reload
 
55
 
 
56
        local name=$(InetdName)
 
57
 
 
58
        [ ! "$name" ] || invoke-rc.d $name reload
49
59
    fi
50
60
}
51
61
 
52
62
Main ()
53
63
{
54
 
    IsInetd && MainInetd "$@"
 
64
    if IsInetd ; then
 
65
        MainInetd "$@"
 
66
    fi
 
67
 
55
68
    Debhelper
56
69
}
57
70