From c2a5e8b4187d7c60df9d4862103f7cfc27ba76e2022770eda0f2f72e2439aea2 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 21 May 2014 14:13:32 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=640 --- systemd-mini.changes | 6 ++++++ systemd-mini.spec | 24 ++++++++++++++++++++++++ systemd.changes | 6 ++++++ systemd.spec | 24 ++++++++++++++++++++++++ 4 files changed, 60 insertions(+) diff --git a/systemd-mini.changes b/systemd-mini.changes index 9c3b08b5..929ea77d 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed May 21 13:24:13 UTC 2014 - werner@suse.de + +- Add a workaround for old distributions like 13.1 to avoid + deadlocks due NFS shares stopped after network + ------------------------------------------------------------------- Wed May 21 10:23:14 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index b140e004..e8b1219b 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -1213,6 +1213,30 @@ do done %endif +%if 0%{suse_version} < 1310 +cat > %{buildroot}/%{_prefix}/lib/systemd/system/fix.service <<-'EOF' + [Unit] + Description=Fix against deadlock at shutdown + Wants=remote-fs.target remote-fs-pre.target + Before=remote-fs.target systemd-logind.service + After=remote-fs-pre.target network.target rpcbind.target nss-lookup.target nss-user-lookup.target + ConditionPathExists=|/etc/init.d/autofs + ConditionPathExists=|/etc/init.d/nfs + + [Service] + Type=oneshot + RemainAfterExit=true + ExecStart=/bin/true + ExecStop=-/etc/init.d/autofs stop + ExecStop=-/etc/init.d/nfs stop + + [Install] + WantedBy=remote-fs.target + EOF + mkdir -p %{buildroot}/%{_prefix}/lib/systemd/system/remote-fs.target.wants + ln -sf ../fix.service %{buildroot}/%{_prefix}/lib/systemd/system/remote-fs.target.wants +%endif + %pre getent group systemd-journal >/dev/null || groupadd -r systemd-journal || : exit 0 diff --git a/systemd.changes b/systemd.changes index 9c3b08b5..929ea77d 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed May 21 13:24:13 UTC 2014 - werner@suse.de + +- Add a workaround for old distributions like 13.1 to avoid + deadlocks due NFS shares stopped after network + ------------------------------------------------------------------- Wed May 21 10:23:14 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index 55b5afc1..1af650af 100644 --- a/systemd.spec +++ b/systemd.spec @@ -1208,6 +1208,30 @@ do done %endif +%if 0%{suse_version} < 1310 +cat > %{buildroot}/%{_prefix}/lib/systemd/system/fix.service <<-'EOF' + [Unit] + Description=Fix against deadlock at shutdown + Wants=remote-fs.target remote-fs-pre.target + Before=remote-fs.target systemd-logind.service + After=remote-fs-pre.target network.target rpcbind.target nss-lookup.target nss-user-lookup.target + ConditionPathExists=|/etc/init.d/autofs + ConditionPathExists=|/etc/init.d/nfs + + [Service] + Type=oneshot + RemainAfterExit=true + ExecStart=/bin/true + ExecStop=-/etc/init.d/autofs stop + ExecStop=-/etc/init.d/nfs stop + + [Install] + WantedBy=remote-fs.target + EOF + mkdir -p %{buildroot}/%{_prefix}/lib/systemd/system/remote-fs.target.wants + ln -sf ../fix.service %{buildroot}/%{_prefix}/lib/systemd/system/remote-fs.target.wants +%endif + %pre getent group systemd-journal >/dev/null || groupadd -r systemd-journal || : exit 0