[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#571056: chroot_upstart: divert initctl (like policy-rc.d) to fix start(8) in Ubuntu Lucid postinsts.



Trent W. Buck wrote:
> In chroot_sysv-rc, live-helper currently creates a policy-rc.d that
> prevents daemons from starting when they are installed.  This works
> well for sysvinit packages.
>
> However, when working with Ubuntu Lucid[0] chroots, many daemons use
> upstart instead of sysvinit.  Thus, they ignore policy-rc.d, try
> (and fail) to start, further causing dpkg and thus "lh build" to
> fail.
>
> According to CJ Watson of #ubuntu-devel, this can be done by
> diverting /sbin/initctl and substituting a stub.  An example of this
> can be seen in debootstrap's "gutsy" script (excerpt below).  Please
> add something similar, I guess to
> /usr/share/live-helper/helpers/chroot_upstart.

I ran the following in ./helpers/ of the 2.0~a8 source, rebuild and
installed the resulting .deb.  It works for me, so please include it
in the next release.

 sed 's/policy-rc.d/initctl/g; s/sysv-rc/upstart/' chroot_sysv-rc >chroot_upstart
 sed -i '/chroot_sysv-rc/ {p; s/sysv-rc/upstart/g }' chroot binary*
 chmod +x chroot_upstart

PS: I tried to send the literal patch with "git send-email", but
AFAICT it didn't arrive.  The above should be clearer anyway.



Reply to: