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
8 Source0: http://www.stud.uni-hamburg.de/~lennart/projects/ifplugd/%{name}-%{version}.tar.gz
9 # Source0-md5: a576c20b1834201bcadf18909ed8d699
11 URL: http://www.stud.uni-hamburg.de/users/lennart/projects/ifplugd/
12 BuildRequires: libdaemon-devel >= 0.5
15 Requires(post,preun): /sbin/chkconfig
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 %define _sbindir /sbin
21 ifplugd is a Linux daemon which will automatically configure your
22 ethernet device when a cable is plugged in and automatically
23 unconfigure it if the cable is pulled. This is useful on laptops with
24 onboard network adapters, since it will only configure the interface
25 when a cable is really connected.
28 ifplugd jest demonem linuksowym, który automatycznie konfiguruje kartê
29 sieciow± ethernet w chwili pod³±czenia do niej kabla i automatycznie
30 usuwa jej konfiguracjê, gdy kabel jest od³±czany. Przydaje siê to w
31 laptopach z kart± sieciow± na p³ycie, gdy¿ powoduje to skonfigurowanie
32 interfejsu tylko wtedy, gdy kabel jest rzeczywi¶cie pod³±czony.
42 rm -rf $RPM_BUILD_ROOT
43 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
46 DESTDIR=$RPM_BUILD_ROOT
48 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
51 rm -rf $RPM_BUILD_ROOT
54 /sbin/chkconfig --add %{name}
55 if [ -f /var/lock/subsys/%{name} ]; then
56 /etc/rc.d/init.d/%{name} restart 1>&2
58 echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} service."
62 if [ "$1" = "0" ]; then
63 if [ -f /var/lock/subsys/%{name} ]; then
64 /etc/rc.d/init.d/%{name} stop 1>&2
66 /sbin/chkconfig --del %{name}
70 %defattr(644,root,root,755)
71 %doc doc/README doc/NEWS doc/README.html doc/style.css
72 %attr(755,root,root) %{_sbindir}/*
74 %attr(754,root,root) /etc/rc.d/init.d/%{name}
75 %dir %{_sysconfdir}/ifplugd
76 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ifplugd/ifplugd.conf
77 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ifplugd/ifplugd.action