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
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
%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
/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
--- /dev/null
+[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