From 1ca8b51c0349faa884ad8a5d6c4f05cf2074f49d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 4 Aug 2015 20:00:12 +0200 Subject: [PATCH] fedora: simulate preset-all only on first install, not upgrade --- rpm_spec/core-vm.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpm_spec/core-vm.spec b/rpm_spec/core-vm.spec index 7335690..17bd222 100644 --- a/rpm_spec/core-vm.spec +++ b/rpm_spec/core-vm.spec @@ -593,6 +593,7 @@ The Qubes core startup configuration for SystemD init. %post systemd +PRESET_FAILED=0 if [ $1 -eq 1 ]; then /bin/systemctl --no-reload preset-all > /dev/null 2>&1 && PRESET_FAILED=0 || PRESET_FAILED=1 else @@ -621,7 +622,7 @@ grep '^[[:space:]]*[^#;]' /lib/systemd/system-preset/75-qubes-vm.preset | while ;; *) # preset-all is not available in fc20; so preset each unit file listed in 75-qubes-vm.preset - if [ "${PRESET_FAILED}" -eq 1 ]; then + if [ $1 -eq 1 -a "${PRESET_FAILED}" -eq 1 ]; then systemctl --no-reload preset "${unit_name}" > /dev/null 2>&1 || true fi ;;