d/postinst: ensure sytemd-networkd is enabled

This commit is contained in:
Christophe Siraut 2018-03-06 17:18:27 +01:00
parent 8fcb76dc9b
commit fd15c3adda
1 changed files with 42 additions and 0 deletions

42
debian/dspawn.postinst vendored Normal file
View File

@ -0,0 +1,42 @@
#!/bin/sh
# postinst script for entrouvert-common
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure)
deb-systemd-invoke enable systemd-networkd.service
deb-systemd-invoke enable machines.target
systemctl is-active systemd-networkd.service || deb-systemd-invoke start systemd-networkd.service
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0