[debhelper-devel] [Bug 1312836] Re: [systemd] dh_installinit does not create /etc/rc*.d/S??foo if there is an /etc/init/foo.conf

Steve Langasek steve.langasek at canonical.com
Tue May 13 19:59:44 UTC 2014


On Tue, May 13, 2014 at 05:28:10AM -0000, Martin Pitt wrote:
> thanks for the explanations!

> Steve Langasek [2014-05-12 16:09 -0000]:
> > 2.  The masking support is done via startpar + startpar-upstart-bridge,
> > which is only available once we're insserv enabled.

> Ah, good to know. So startpar knows about upstart jobs and won't
> create static runlevel symlinks?

insserv still creates the links.  Startpar, which is the component that runs
as boot, recognizes that the init scripts should be masked by upstart jobs.

> Because /etc/init/rc.conf doesn't seem to have any particular magic for
> ignoring rc?.d/ links which have a corresponding upstart job.

Correct.


> >  1) fix all per-package deltas in Ubuntu that removed initscripts from the
> >     package in favor of upstart jobs (i.e.: bring the packages in line with
> >     current Debian policy wrt upstart jobs)

> That's https://www.debian.org/doc/debian-policy/ch-opersys.html#s-upstart
> , right?  I.e.  we'll also need to update the init.d scripts in these
> packages to add init_is_upstart().

Or to ensure the package is including /lib/lsb/init-functions and is used
with upstart >= 1.12.1-0ubuntu6, which includes Dimitri's change to make all
LSB init scripts DTRT automatically.

> >  2) undo the insserv/sysvinit/startpar changes that have disabled insserv in
> >     Ubuntu
> >  4) drop the debhelper change

> Just to ensure that I understood this: For 1) we just put back the
> init.d scripts but *without* rc?.d/ links, i. e. we build all those
> packages with the current dh_installinit which does the "does this
> have an upstart job?" test.

Correct.

> Otherwise we'd create a dependency loop between 1) and 2) as we would then
> actually run these init.d scripts.  Then we do 2) and for 4) we rebuild
> all these packages again with the "new" dh_installinit so that these
> packages do get rc?.d symlinks.

Yes, exactly.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org

-- 
You received this bug notification because you are subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1312836

Title:
  [systemd] dh_installinit does not create /etc/rc*.d/S??foo if there is
  an /etc/init/foo.conf

Status in “debhelper” package in Ubuntu:
  Triaged
Status in “ifupdown” package in Ubuntu:
  Triaged

Bug description:
  I had no networking when I booted up with systemd just now.

  laney at raleigh> cat /etc/resolv.conf
  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
  #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

  laney at raleigh> ifconfig
  lo        Link encap:Local Loopback  
            inet addr:127.0.0.1  Mask:255.0.0.0
            inet6 addr: ::1/128 Scope:Host
            UP LOOPBACK RUNNING  MTU:65536  Metric:1
            RX packets:572 errors:0 dropped:0 overruns:0 frame:0
            TX packets:572 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0 
            RX bytes:46364 (46.3 KB)  TX bytes:46364 (46.3 KB)

  laney at raleigh> more /etc/network/interfaces
  # interfaces(5) file used by ifup(8) and ifdown(8)
  auto lo
  iface lo inet loopback

  auto eth0
  iface eth0 inet manual

  auto br0
  iface br0 inet dhcp
      bridge_ports eth0
      bridge_stp off
      bridge_fd 0
      bridge_maxwait 0

  laney at raleigh> sudo ifup eth0 br0
  ifup: failed to open lockfile /run/network/.ifstate.lock: No such file or directory

  Then copying from /etc/init/networking.conf's pre-start

  laney at raleigh> sudo mkdir -p /run/network
  laney at raleigh> sudo ifup -a
  Internet Systems Consortium DHCP Client 4.2.4
  Copyright 2004-2012 Internet Systems Consortium.
  All rights reserved.
  For info, please visit https://www.isc.org/software/dhcp/

  Listening on LPF/br0/30:85:a9:9d:63:f6
  Sending on   LPF/br0/30:85:a9:9d:63:f6
  Sending on   Socket/fallback
  DHCPDISCOVER on br0 to 255.255.255.255 port 67 interval 3 (xid=0x1b02ce25)
  DHCPDISCOVER on br0 to 255.255.255.255 port 67 interval 7 (xid=0x1b02ce25)
  DHCPREQUEST of 192.168.1.136 on br0 to 255.255.255.255 port 67 (xid=0x1b02ce25)
  DHCPOFFER of 192.168.1.136 from 192.168.1.1
  DHCPACK of 192.168.1.136 from 192.168.1.1
  bound to 192.168.1.136 -- renewal in 39350 seconds.
  laney at raleigh> cat /etc/resolv.conf
  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
  #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
  nameserver 192.168.1.1

  I feel like there's probably an existing systemd-ish way of doing
  this.

  ProblemType: Bug
  DistroRelease: Ubuntu 14.04
  Package: ifupdown 0.7.47.2ubuntu4
  ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
  Uname: Linux 3.13.0-24-generic x86_64
  ApportVersion: 2.14.1-0ubuntu3
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Fri Apr 25 18:01:25 2014
  InstallationDate: Installed on 2012-10-07 (564 days ago)
  InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Beta amd64 (20121007)
  SourcePackage: ifupdown
  UpgradeStatus: Upgraded to trusty on 2013-05-07 (353 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/debhelper/+bug/1312836/+subscriptions





More information about the debhelper-devel mailing list