]> git.pld-linux.org Git - packages/libteam.git/commitdiff
Let's have a very nasty hack to fix system halt auto/th/libteam-1.25-2
authorMariusz Mazur <mmazur@axeos.com>
Tue, 9 Aug 2016 11:42:27 +0000 (13:42 +0200)
committerMariusz Mazur <mmazur@axeos.com>
Tue, 9 Aug 2016 11:42:27 +0000 (13:42 +0200)
More info:
https://lists.fedorahosted.org/archives/list/libteam@lists.fedorahosted.org/thread/QYCLFVANHB47URKOST5HFT5EVWPRHGVQ/

libteam.spec
teamd-shutdown-workaround.service [new file with mode: 0644]

index fbc6311a4c6890fe8884f80f405b5400a47b85cb..69e918fbf303bf593cebe31c43963cc7319cb9f6 100644 (file)
@@ -14,6 +14,9 @@ Source3:    teamd-lvl2-service-generator
 Source4:    teamd@.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@.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 (file)
index 0000000..a06a3ed
--- /dev/null
@@ -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
This page took 0.183142 seconds and 4 git commands to generate.