Merge lp:~smoser/ubuntu/natty/xinetd/bug43574 into lp:ubuntu/natty/xinetd

Proposed by Scott Moser
Status: Merged
Approved by: Kees Cook
Approved revision: 9
Merged at revision: 9
Proposed branch: lp:~smoser/ubuntu/natty/xinetd/bug43574
Merge into: lp:ubuntu/natty/xinetd
Diff against target: 71 lines (+59/-0)
2 files modified
debian/changelog (+6/-0)
debian/xinetd.upstart (+53/-0)
To merge this branch: bzr merge lp:~smoser/ubuntu/natty/xinetd/bug43574
Reviewer Review Type Date Requested Status
Kees Cook Approve
Review via email: mp+42637@code.launchpad.net

Description of the change

This fixes bug 43574.

To post a comment you must log in.
Revision history for this message
Kees Cook (kees) wrote :

Seems like this will work as expected. Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2010-03-07 01:11:56 +0000
3+++ debian/changelog 2010-12-03 15:44:42 +0000
4@@ -1,3 +1,9 @@
5+xinetd (1:2.3.14-7ubuntu4) natty; urgency=low
6+
7+ * add xinetd upstart job (LP: #43574)
8+
9+ -- Scott Moser <smoser@ubuntu.com> Tue, 13 Jul 2010 09:24:49 -0400
10+
11 xinetd (1:2.3.14-7ubuntu3) lucid; urgency=low
12
13 * rebuild rest of main for armel armv7/thumb2 optimization;
14
15=== added file 'debian/xinetd.upstart'
16--- debian/xinetd.upstart 1970-01-01 00:00:00 +0000
17+++ debian/xinetd.upstart 2010-12-03 15:44:42 +0000
18@@ -0,0 +1,53 @@
19+# xinetd - the extended Internet services daemon
20+description "xinetd daemon"
21+
22+start on runlevel [2345]
23+stop on runlevel [!2345]
24+
25+## because signal QUIT is sent in pre-stop, respawn cannot be used.
26+## (LP: #605007)
27+#respawn
28+
29+pre-start script
30+ test -x /usr/sbin/xinetd || { stop; exit 0; }
31+end script
32+
33+env PIDFILE=/var/run/xinetd.pid
34+script
35+ INETD_COMPAT=Yes
36+ XINETD_OPTS="-stayalive"
37+
38+ # per upstart convention, options should be set in the upstart job itself.
39+ # However, to be friendly, source and respect old defaults file.
40+ [ ! -f /etc/default/xinetd ] || . /etc/default/xinetd
41+
42+ case "$INETD_COMPAT" in
43+ [Yy]*)
44+ XINETD_OPTS="$XINETD_OPTS -inetd_compat"
45+ if perl -MSocket -e 'exit (!socket($sock, AF_INET6, SOCK_STREAM, 0))'; then
46+ XINETD_OPTS="$XINETD_OPTS -inetd_ipv6"
47+ fi
48+ ;;
49+ esac
50+
51+ checkportmap () {
52+ if grep "^[^ *#]" /etc/xinetd.conf | grep -q 'rpc/'; then
53+ if ! rpcinfo -u localhost portmapper >/dev/null 2>&1; then
54+ echo
55+ echo "WARNING: portmapper inactive - RPC services unavailable!"
56+ echo " Commenting out or removing the RPC services from"
57+ echo " the /etc/xinetd.conf file will remove this message."
58+ echo
59+ fi
60+ fi
61+ }
62+
63+ checkportmap
64+ exec /usr/sbin/xinetd -dontfork -pidfile "$PIDFILE" $XINETD_OPTS
65+end script
66+
67+pre-stop script
68+ xinetd_pid=$(status | awk '/stop\/pre-stop/ { print $NF }')
69+ [ -n "${xinetd_pid}" ] || exit 0
70+ kill -QUIT "${xinetd_pid}"
71+end script

Subscribers

People subscribed via source and target branches

to all changes: