1 Summary: Detect and perform actions when an ethernet cable is (un)plugged
5 Source0: http://www.stud.uni-hamburg.de/~lennart/projects/ifplugd/ifplugd-0.16.tar.gz
6 # Source0-md5: 56b920b51b05949f8a729e8c3e13ba70
10 URL: http://www.stud.uni-hamburg.de/users/lennart/projects/ifplugd/
11 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
12 BuildRequires: libdaemon-devel >= 0.2
15 %define _sbindir /sbin
18 ifplugd is a Linux daemon which will automatically configure your
19 ethernet device when a cable is plugged in and automatically
20 unconfigure it if the cable is pulled. This is useful on laptops with
21 onboard network adapters, since it will only configure the interface
22 when a cable is really connected.
32 rm -rf $RPM_BUILD_ROOT
33 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
36 DESTDIR=$RPM_BUILD_ROOT
38 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
41 rm -rf $RPM_BUILD_ROOT
44 /sbin/chkconfig --add %{name}
45 if [ -f /var/lock/subsys/%{name} ]; then
46 /etc/rc.d/init.d/%{name} restart 1>&2
48 echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} service."
52 if [ "$1" = "0" ]; then
53 if [ -f /var/lock/subsys/%{name} ]; then
54 /etc/rc.d/init.d/%{name} stop 1>&2
56 /sbin/chkconfig --del %{name}
60 %defattr(644,root,root,755)
61 %doc doc/README doc/NEWS doc/README.html doc/style.css
64 %attr(754,root,root) /etc/rc.d/init.d/%{name}
65 %dir %{_sysconfdir}/ifplugd
66 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ifplugd/ifplugd.conf
67 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ifplugd/ifplugd.action