1 Summary: Detect and perform actions when an ethernet cable is (un)plugged
2 Summary(pl): Wykrywanie pod³±czenia/od³±czenia kabla ethernetowego i podejmowanie dzia³añ z tym zwi±zanych
6 Source0: http://www.stud.uni-hamburg.de/~lennart/projects/ifplugd/ifplugd-0.16.tar.gz
7 # Source0-md5: 56b920b51b05949f8a729e8c3e13ba70
11 URL: http://www.stud.uni-hamburg.de/users/lennart/projects/ifplugd/
12 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
13 BuildRequires: libdaemon-devel >= 0.2
16 %define _sbindir /sbin
19 ifplugd is a Linux daemon which will automatically configure your
20 ethernet device when a cable is plugged in and automatically
21 unconfigure it if the cable is pulled. This is useful on laptops with
22 onboard network adapters, since it will only configure the interface
23 when a cable is really connected.
26 ifplugd jest demonem linuksowym, który automatycznie konfiguruje kartê
27 sieciow± ethernet w chwili pod³±czenia do niej kabla i automatycznie
28 usuwa jej konfiguracjê, gdy kabel jest od³±czany. Przydaje siê to w
29 laptopach z kart± sieciow± na p³ycie, gdy¿ powoduje to skonfigurowanie
30 interfejsu tylko wtedy, gdy kabel jest rzeczywi¶cie pod³±czony.
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
44 DESTDIR=$RPM_BUILD_ROOT
46 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
49 rm -rf $RPM_BUILD_ROOT
52 /sbin/chkconfig --add %{name}
53 if [ -f /var/lock/subsys/%{name} ]; then
54 /etc/rc.d/init.d/%{name} restart 1>&2
56 echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} service."
60 if [ "$1" = "0" ]; then
61 if [ -f /var/lock/subsys/%{name} ]; then
62 /etc/rc.d/init.d/%{name} stop 1>&2
64 /sbin/chkconfig --del %{name}
68 %defattr(644,root,root,755)
69 %doc doc/README doc/NEWS doc/README.html doc/style.css
70 %attr(755,root,root) %{_sbindir}/*
72 %attr(754,root,root) /etc/rc.d/init.d/%{name}
73 %dir %{_sysconfdir}/ifplugd
74 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ifplugd/ifplugd.conf
75 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ifplugd/ifplugd.action