Merge lp://qastaging/~clint-fewbar/ubuntu/natty/openssh/init.d-chroot-aware into lp://qastaging/ubuntu/natty/openssh

Proposed by Clint Byrum
Status: Merged
Merged at revision: 3232
Proposed branch: lp://qastaging/~clint-fewbar/ubuntu/natty/openssh/init.d-chroot-aware
Merge into: lp://qastaging/ubuntu/natty/openssh
Diff against target: 44 lines (+26/-0)
2 files modified
debian/changelog (+9/-0)
debian/openssh-server.ssh.init (+17/-0)
To merge this branch: bzr merge lp://qastaging/~clint-fewbar/ubuntu/natty/openssh/init.d-chroot-aware
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Ubuntu Sponsors Pending
Review via email: mp+48070@code.qastaging.launchpad.net

Description of the change

This copies code from initramfs-tools per cjwatson's suggestion to test whether or not the init.d script is running chrooted. If it is not chrooted, then we just exec /lib/init/upstart-job, making it work much the same way as if /etc/init.d/ssh were symlinked.

To post a comment you must log in.
Revision history for this message
Scott Moser (smoser) wrote :

I suspect that it does not matter, but I'm fairly sure that the check given there would fail if inside a container rather than a chroot. (container's /proc/1 probably isn't /sbin/init).

I suspect that this is fine, and even intended as likely/possibly inside a container they would have their own ssh.

Revision history for this message
Evan Broder (broder) wrote :

This patch looks good to me.

But...it looks like Upstart just landed chroot support. Does that mean that we can just completely replace /etc/init.d/ssh with a symlink to /lib/init/upstart-job now? Do we want to do that instead of this patch?

Revision history for this message
Colin Watson (cjwatson) wrote :

Chroot support doesn't quite work yet IME. I still want to land this
patch in the meantime.

Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: