Summary: Daemon that responds to network cables being plugged in and out Name: netplug Version: 1.2.9.2 Release: 22%{?dist} License: GPLv2 URL: http://www.red-bean.com/~bos/ Source0: http://www.red-bean.com/~bos/netplug/netplug-%{version}.tar.bz2 Source1: netplugd.service #execshield patch for netplug Patch1: netplug-1.2.9.2-execshield.patch Patch2: netplug-1.2.9.2-man.patch BuildRequires: make BuildRequires: gcc BuildRequires: systemd BuildRequires: gettext Requires: iproute Requires(post): systemd Requires(preun): systemd Requires(postun): systemd %description Netplug is a daemon that manages network interfaces in response to link-level events such as cables being plugged in and out. When a cable is plugged into an interface, the netplug daemon brings that interface up. When the cable is unplugged, the daemon brings that interface back down. This is extremely useful for systems such as laptops, which are constantly being unplugged from one network and plugged into another, and for moving systems in a machine room from one switch to another without a need for manual intervention. %prep %setup -q %patch1 -p1 -b .execshield %patch2 -p1 -b .man %build export CFLAGS="$RPM_OPT_FLAGS $CFLAGS" make %install make install prefix=%{buildroot} \ bindir=%{buildroot}/%{_sbindir} \ mandir=%{buildroot}/%{_mandir} mkdir -p %{buildroot}/%{_mandir}/man5 ln -fs %{_mandir}/man8/netplugd.8.gz %{buildroot}/%{_mandir}/man5/netplug.5.gz ln -fs %{_mandir}/man8/netplugd.8.gz %{buildroot}/%{_mandir}/man5/netplug.d.5.gz ln -fs %{_mandir}/man8/netplugd.8.gz %{buildroot}/%{_mandir}/man5/netplugd.conf.5.gz # systemd unit files mkdir -p %{buildroot}%{_unitdir} install -m 644 %{SOURCE1} %{buildroot}%{_unitdir} rm -f %{buildroot}/etc/rc.d/init.d/netplugd %post %systemd_post netplugd.service %preun %systemd_preun netplugd.service %postun %systemd_postun_with_restart netplugd.service %files %doc COPYING README TODO %{_sbindir}/netplugd %{_mandir}/man[58]/* %dir %{_sysconfdir}/netplug.d %{_sysconfdir}/netplug.d/netplug %config(noreplace) %{_sysconfdir}/netplug.d/netplugd.conf %{_unitdir}/netplugd.service %changelog * Fri Jul 22 2022 Fedora Release Engineering - 1.2.9.2-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Thu Jan 20 2022 Fedora Release Engineering - 1.2.9.2-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Jul 22 2021 Fedora Release Engineering - 1.2.9.2-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 1.2.9.2-19 - Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. * Tue Jan 26 2021 Fedora Release Engineering - 1.2.9.2-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Tue Jul 28 2020 Fedora Release Engineering - 1.2.9.2-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Wed Jan 29 2020 Fedora Release Engineering - 1.2.9.2-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Jul 25 2019 Fedora Release Engineering - 1.2.9.2-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Fri Feb 01 2019 Fedora Release Engineering - 1.2.9.2-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Fri Jul 13 2018 Fedora Release Engineering - 1.2.9.2-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Fri Feb 09 2018 Igor Gnatenko - 1.2.9.2-12 - Escape macros in %%changelog * Thu Feb 08 2018 Fedora Release Engineering - 1.2.9.2-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Aug 03 2017 Fedora Release Engineering - 1.2.9.2-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Wed Jul 26 2017 Fedora Release Engineering - 1.2.9.2-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Fri Feb 10 2017 Fedora Release Engineering - 1.2.9.2-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Thu Feb 04 2016 Fedora Release Engineering - 1.2.9.2-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Wed Jun 17 2015 Fedora Release Engineering - 1.2.9.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sun Aug 17 2014 Fedora Release Engineering - 1.2.9.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 1.2.9.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Aug 04 2013 Jiri Popelka - 1.2.9.2-3 - BuildRequires: systemd due to %%{_unitdir} * Sat Aug 03 2013 Fedora Release Engineering - 1.2.9.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Mon Feb 25 2013 Jiri Popelka - 1.2.9.2-1 - provide native systemd unit file (#914762) * Thu Feb 14 2013 Fedora Release Engineering - 1.2.9.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Fri Jul 20 2012 Fedora Release Engineering - 1.2.9.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Fri Jan 13 2012 Fedora Release Engineering - 1.2.9.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Tue Feb 08 2011 Fedora Release Engineering - 1.2.9.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Sep 30 2009 Jiri Popelka - 1.2.9.1-3 - use %%{_initddir} macro instead of deprecated %%{_initrddir} * Wed Sep 30 2009 Jiri Popelka - 1.2.9.1-2 - fix init script to be LSB-compliant (#522888) * Tue Sep 8 2009 Jiri Popelka - 1.2.9.1-1 - Initial standalone package. Up to now netplug has been part of net-tools.