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://0pointer.de/lennart/projects/ifplugd/%{name}-%{version}.tar.gz
9 # Source0-md5: f0ceac6690b02928015aa00c0d3e663b
11 Patch0: %{name}-nostdc99.patch
12 URL: http://www.stud.uni-hamburg.de/users/lennart/projects/ifplugd/
13 BuildRequires: autoconf
14 BuildRequires: automake
15 BuildRequires: libdaemon-devel >= 0.5
17 BuildRequires: pkgconfig
19 Requires(post,preun): /sbin/chkconfig
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 %define _sbindir /sbin
25 ifplugd is a Linux daemon which will automatically configure your
26 ethernet device when a cable is plugged in and automatically
27 unconfigure it if the cable is pulled. This is useful on laptops with
28 onboard network adapters, since it will only configure the interface
29 when a cable is really connected.
32 ifplugd jest demonem linuksowym, który automatycznie konfiguruje kartê
33 sieciow± ethernet w chwili pod³±czenia do niej kabla i automatycznie
34 usuwa jej konfiguracjê, gdy kabel jest od³±czany. Przydaje siê to w
35 laptopach z kart± sieciow± na p³ycie, gdy¿ powoduje to skonfigurowanie
36 interfejsu tylko wtedy, gdy kabel jest rzeczywi¶cie pod³±czony.
45 --disable-subversion \
47 --with-initdir=/etc/rc.d/init.d
51 rm -rf $RPM_BUILD_ROOT
52 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
55 DESTDIR=$RPM_BUILD_ROOT
57 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
60 rm -rf $RPM_BUILD_ROOT
63 /sbin/chkconfig --add %{name}
64 if [ -f /var/lock/subsys/%{name} ]; then
65 /etc/rc.d/init.d/%{name} restart 1>&2
67 echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} service."
71 if [ "$1" = "0" ]; then
72 if [ -f /var/lock/subsys/%{name} ]; then
73 /etc/rc.d/init.d/%{name} stop 1>&2
75 /sbin/chkconfig --del %{name}
79 %defattr(644,root,root,755)
80 %doc doc/README doc/NEWS doc/README.html doc/style.css
81 %attr(755,root,root) %{_sbindir}/*
83 %attr(754,root,root) /etc/rc.d/init.d/%{name}
84 %dir %{_sysconfdir}/ifplugd
85 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ifplugd/ifplugd.conf
86 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ifplugd/ifplugd.action