~ubuntu-branches/ubuntu/oneiric/openbsd-inetd/oneiric

« back to all changes in this revision

Viewing changes to debian/preinst

  • Committer: Bazaar Package Importer
  • Author(s): Marco d'Itri
  • Date: 2005-01-02 02:40:43 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050102024043-e58kyd2n8kdrslea
Tags: 0.20040915-1
* New CVS snapshot.
  + Fixes gcc 4.0 FTBFS. (Closes: #287860)
* Made the init script source /etc/default/openbsd-inetd, if present.
  (Closes: #251224)
* Documented in inetd(8) that switching between binding to INADDR_ANY and
  to a specific address requires restarting the daemon. (Closes: #242392)
* Added code to create the requested type of IPv6 socket using
  setsockopt(IPPROTO_IPV6). This requires a modern 2.4 or 2.6 kernel.
* Added Conflicts+Replaces+Provides: netkit-inetd to fully replace it.
  prerm will unlink netkit-inetd's conffiles and the init script is
  named openbsd-inetd to allow purging netkit-inetd.
  Alternative solutions to both issues are welcome.
* Changed the default inetd.conf to satisfy people who think that every
  listening socket is a security hole: no internal services are enabled
  by default. This means that the daemon will not even be started by the
  init script until some service is enabled in inetd.conf.
* Removed from the default inetd.conf the already-commented examples
  of the internal services which are actually dangerous to run.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh -e
2
 
 
3
 
if [ "$1" = "install" -a -x /etc/init.d/inetd ]; then
4
 
  /etc/init.d/inetd stop
5
 
fi
6
 
 
7
 
DIVERT="/usr/sbin/inetd /usr/share/man/man8/inetd.8.gz /usr/share/man/man5/inetd.conf.5.gz"
8
 
 
9
 
if [ install = "$1" -o upgrade = "$1" ]; then
10
 
  for file in $DIVERT; do 
11
 
      dpkg-divert --package openbsd-inetd --add --rename \
12
 
         --divert $file.netkit $file
13
 
  done
14
 
fi
15
 
 
16
 
# create a new /etc/inetd.conf file if it doesn't already exist
17
 
if [ ! -f /etc/inetd.conf ]; then
18
 
        cat <<EOF >/etc/inetd.conf
19
 
# /etc/inetd.conf:  see inetd(8) for further informations.
20
 
#
21
 
# Internet server configuration database
22
 
#
23
 
#
24
 
# Lines starting with "#:LABEL:" or "#<off>#" should not
25
 
# be changed unless you know what you are doing!
26
 
#
27
 
# If you want to disable an entry so it isn't touched during
28
 
# package updates just comment it out with a single '#' character.
29
 
#
30
 
# Packages should modify this file by using update-inetd(8)
31
 
#
32
 
# <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
33
 
#
34
 
#:INTERNAL: Internal services
35
 
#echo           stream  tcp     nowait  root    internal
36
 
#echo           dgram   udp     wait    root    internal
37
 
#chargen        stream  tcp     nowait  root    internal
38
 
#chargen        dgram   udp     wait    root    internal
39
 
discard         stream  tcp     nowait  root    internal
40
 
discard         dgram   udp     wait    root    internal
41
 
daytime         stream  tcp     nowait  root    internal
42
 
#daytime        dgram   udp     wait    root    internal
43
 
time            stream  tcp     nowait  root    internal
44
 
#time           dgram   udp     wait    root    internal
45
 
 
46
 
#:STANDARD: These are standard services.
47
 
 
48
 
#:BSD: Shell, login, exec and talk are BSD protocols.
49
 
 
50
 
#:MAIL: Mail, news and uucp services.
51
 
 
52
 
#:INFO: Info services
53
 
 
54
 
#:BOOT: Tftp service is provided primarily for booting.  Most sites
55
 
# run this only on machines acting as "boot servers."
56
 
 
57
 
#:RPC: RPC based services
58
 
 
59
 
#:HAM-RADIO: amateur-radio services
60
 
 
61
 
#:OTHER: Other services
62
 
 
63
 
EOF
64
 
        chmod 644 /etc/inetd.conf
65
 
fi
66
 
 
67
 
##DEBHELPER##