From 4996dd760909a727d016cfd50ffbe39dffc7eb0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 13 Jul 2016 22:13:17 +0200 Subject: [PATCH] rpm: fix misleading systemd warnings during upgrade systemctl preset output lengthy warning when trying to operate on non-existing unit. This preset action is meant to disable unit, so it's even better it doesn't exists. --- rpm_spec/core-vm.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rpm_spec/core-vm.spec b/rpm_spec/core-vm.spec index 16bf4dc..21a304d 100644 --- a/rpm_spec/core-vm.spec +++ b/rpm_spec/core-vm.spec @@ -600,8 +600,12 @@ else done /bin/systemctl --no-reload preset qubes-update-check.timer # Upgrade path - now qubes-iptables is used instead - /bin/systemctl --no-reload preset iptables.service - /bin/systemctl --no-reload preset ip6tables.service + if [ -f /lib/systemd/system/iptables.service ]; then + /bin/systemctl --no-reload preset iptables.service + fi + if [ -f /lib/systemd/system/ip6tables.service ]; then + /bin/systemctl --no-reload preset ip6tables.service + fi fi # Set default "runlevel"