Merge lp:~clint-fewbar/ubuntu/maverick/openssh/init.d-upstart-aware into lp:~cjwatson/ubuntu/maverick/openssh/maverick-proposed

Proposed by Clint Byrum
Status: Merged
Merge reported by: Clint Byrum
Merged at revision: not available
Proposed branch: lp:~clint-fewbar/ubuntu/maverick/openssh/init.d-upstart-aware
Merge into: lp:~cjwatson/ubuntu/maverick/openssh/maverick-proposed
Diff against target: 49 lines (+31/-0)
2 files modified
debian/changelog (+14/-0)
debian/openssh-server.ssh.init (+17/-0)
To merge this branch: bzr merge lp:~clint-fewbar/ubuntu/maverick/openssh/init.d-upstart-aware
Reviewer Review Type Date Requested Status
Colin Watson Pending
Review via email: mp+52678@code.launchpad.net

Description of the change

SRU for init.d issue.

To post a comment you must log in.

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 2011-01-07 10:24:38 +0000
3+++ debian/changelog 2011-03-09 13:33:58 +0000
4@@ -1,3 +1,17 @@
5+openssh (1:5.5p1-4ubuntu6) maverick-proposed; urgency=low
6+
7+ [ Clint Byrum ]
8+ * debian/openssh-server.ssh.init: Adding upstart awareness that will
9+ call /lib/init/upstart-job when script is run outside of a chroot.
10+ While this fixes LP: #531912, the change should be reverted when
11+ upstart gains chroot session support.
12+
13+ [ Colin Watson ]
14+ * Only do the above if /etc/init/ssh.conf still exists, since apparently
15+ some people have been removing it.
16+
17+ -- Clint Byrum <clint@ubuntu.com> Wed, 09 Mar 2011 05:10:07 -0800
18+
19 openssh (1:5.5p1-4ubuntu5) maverick-proposed; urgency=low
20
21 * debian/openssh-server.ssh.upstart: drop 'expect fork' and run sshd
22
23=== modified file 'debian/openssh-server.ssh.init'
24--- debian/openssh-server.ssh.init 2010-04-16 09:59:45 +0000
25+++ debian/openssh-server.ssh.init 2011-03-09 13:33:58 +0000
26@@ -16,6 +16,23 @@
27 test -x /usr/sbin/sshd || exit 0
28 ( /usr/sbin/sshd -\? 2>&1 | grep -q OpenSSH ) 2>/dev/null || exit 0
29
30+chrooted() {
31+ # borrowed from udev's postinst
32+ # and then borrowed from initramfs-tools's preinst
33+ if [ "$(stat -c %d/%i /)" = "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ]; then
34+ # the devicenumber/inode pair of / is the same as that of
35+ # /sbin/init's root, so we're *not* in a chroot and hence
36+ # return false.
37+ return 1
38+ fi
39+ return 0
40+}
41+
42+# The init.d script is only for chroots
43+if [ -e /etc/init/ssh.conf ] && ! chrooted; then
44+ exec /lib/init/upstart-job ssh $@
45+fi
46+
47 umask 022
48
49 if test -f /etc/default/ssh; then

Subscribers

People subscribed via source and target branches

to all changes: