[packages/libteam] Let's have a very nasty hack to fix system halt
mmazur
mmazur at pld-linux.org
Tue Aug 9 13:43:18 CEST 2016
commit 27b8783c91810040bb54feef7187fd2f46015b60
Author: Mariusz Mazur <mmazur at axeos.com>
Date: Tue Aug 9 13:42:27 2016 +0200
Let's have a very nasty hack to fix system halt
More info:
https://lists.fedorahosted.org/archives/list/libteam@lists.fedorahosted.org/thread/QYCLFVANHB47URKOST5HFT5EVWPRHGVQ/
libteam.spec | 9 +++++++--
teamd-shutdown-workaround.service | 12 ++++++++++++
2 files changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/libteam.spec b/libteam.spec
index fbc6311..69e918f 100644
--- a/libteam.spec
+++ b/libteam.spec
@@ -14,6 +14,9 @@ Source3: teamd-lvl2-service-generator
Source4: teamd at .service
Source5: teamd-lvl1.target
Source6: teamd-lvl2.target
+# You might not be able to shut down your system without this:
+# https://lists.fedorahosted.org/archives/list/libteam@lists.fedorahosted.org/thread/QYCLFVANHB47URKOST5HFT5EVWPRHGVQ/
+Source7: teamd-shutdown-workaround.service
Patch0: %{name}-link.patch
URL: http://libteam.org/
BuildRequires: autoconf >= 2.50
@@ -116,6 +119,7 @@ install %{SOURCE3} $RPM_BUILD_ROOT/lib/systemd/system-generators
install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}
install %{SOURCE5} $RPM_BUILD_ROOT%{systemdunitdir}
install %{SOURCE6} $RPM_BUILD_ROOT%{systemdunitdir}
+install %{SOURCE7} $RPM_BUILD_ROOT%{systemdunitdir}
# obsoleted by pkg-config
%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
@@ -125,10 +129,10 @@ rm -rf $RPM_BUILD_ROOT
%post
/sbin/ldconfig
-%systemd_post teamd-lvl1.target teamd-lvl2.target
+%systemd_post teamd-lvl1.target teamd-lvl2.target teamd-shutdown-workaround.service
%preun
-%systemd_preun teamd-lvl1.target teamd-lvl2.target
+%systemd_preun teamd-lvl1.target teamd-lvl2.target teamd-shutdown-workaround.service
%postun
/sbin/ldconfig
@@ -141,6 +145,7 @@ rm -rf $RPM_BUILD_ROOT
/etc/dbus-1/system.d/teamd.conf
%{systemdunitdir}/teamd at .service
%{systemdunitdir}/teamd-lvl?.target
+%{systemdunitdir}/teamd-shutdown-workaround.service
%attr(755,root,root) %{_bindir}/bond2team
%attr(755,root,root) %{_bindir}/teamd
%attr(755,root,root) %{_bindir}/teamdctl
diff --git a/teamd-shutdown-workaround.service b/teamd-shutdown-workaround.service
new file mode 100644
index 0000000..a06a3ed
--- /dev/null
+++ b/teamd-shutdown-workaround.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=DELETE ALL VLAN INTERFACES (teamd hack)
+Before=network.service
+Wants=network-pre.target
+After=teamd-lvl2.target
+
+[Service]
+ExecStart=/bin/sleep 99999d
+ExecStopPost=/bin/sh -c "for if in $(ip link show type vlan|grep '@'|awk '{print $2}'|cut -d@ -f 1); do /sbin/ip link delete $if; done"
+
+[Install]
+WantedBy=network.target
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libteam.git/commitdiff/27b8783c91810040bb54feef7187fd2f46015b60
More information about the pld-cvs-commit
mailing list