Page MenuHomePhabricator

remove unnecessary 'systemctl restart' call from qubes-whonix package
Closed, ResolvedPublic

Description

From https://github.com/nrgaway/qubes-whonix/blob/Whonix11/debian/qubes-whonix.postinst#L162 ... The following can be removed.

# Will not be restarted in chroot which is what is expected
systemctl restart qubes-whonix-network.service
systemctl restart qubes-whonix-firewall.service

Because debhelper does the right thing. (Using deb-systemd-invoke (Which is a pretty small, simple looking script, effectively without comments just ~40 lines of perl code, used by whole Debian.) Adds the following code to the postinst.

# Automatically added by dh_systemd_start
if [ -d /run/systemd/system ]; then
	systemctl --system daemon-reload >/dev/null || true
	deb-systemd-invoke start qubes-whonix-network.service qubes-whonix-firewall.service >/dev/null || true
fi
# End automatically added section

This also fixes a lintian warning (W: qubes-whonix: maintainer-script-calls-systemctl). (T186)

Details

Impact
Normal

Event Timeline

Patrick created this task.May 28 2015, 1:01 AM
Patrick updated the task description. (Show Details)
Patrick raised the priority of this task from to Normal.
Patrick assigned this task to nrgaway.
Patrick set Impact to Normal.
Patrick added subscribers: Patrick, nrgaway.