1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00
Files
CumulusNetworks-ifupdown2/debian/rules
Dave Olson 07678ee4ce Create a networking service script, so we can run it after switchd
Ticket: CM-8790
Reviewed By: wkok,roopa
Testing Done: built, installed, rebooted

jessie's networking starts as an init.d service.   Trying to force ordering
between init.d and systemd services when there are dependencies doesn't work
well (especially since the init.d/networking service is forced very early
because of the remote filesystem requirement in jesie).

Converting networking to a script run as a systemd service allows us to start
networking after switchd.  The new script is /sbin/start-networking.  I chose
to keep it in /sbin, rather than put it in /usr/cumulus/bin, because it's core
functionaity.

I am not removing /etc/init.d/networking, it just gets ignored unless somebody
types it manually.  If somebody does that, systemctl runs through the lsb
hooks.  The two lost abilities below are just ignored if passed.  I'm
also preventing creating the rc.d symlinks to the init.d/networking
script to reduce future confusion.

We lose some init.d "convenience" functionality because it's not available
through systemd.  What we lose are:
  reload-currently-up - can still be done with ifreload --currently-up
  force-reload - can still be done with ifreload -f -a
We keep start, stop, reload, restart
2016-01-20 13:05:13 -08:00

24 lines
692 B
Makefile
Executable File

#!/usr/bin/make -f
#export DH_VERBOSE=1
export PYBUILD_NAME=ifupdown2
export PYBUILD_INSTALL_ARGS=--install-lib=/usr/share/ifupdown2 --install-scripts=/usr/share/ifupdown2
%:
dh $@ --with python2 --with systemd --buildsystem=pybuild
override_dh_installman:
./scripts/genmanpages.sh ./man.rst ./man
dh_installman
override_dh_systemd_start:
dh_systemd_start --name=networking --no-start
override_dh_systemd_enable:
dh_systemd_enable --name=networking
# init.d/networking is installed, but we don't want any symlinks; it's
# never used by anything, so avoid the confusion of the symlinks.
override_dh_installinit:
dh_installinit --name=networking --no-start -uremove networking.init