]> git.pld-linux.org Git - packages/ifplugd.git/commitdiff
- need to write ifplugd.init script
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 28 Aug 2003 23:02:21 +0000 (23:02 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    ifplugd.spec -> 1.1

ifplugd.spec [new file with mode: 0644]

diff --git a/ifplugd.spec b/ifplugd.spec
new file mode 100644 (file)
index 0000000..61de461
--- /dev/null
@@ -0,0 +1,69 @@
+Summary:       Detect and perform actions when an ethernet cable is (un)plugged
+Name:          ifplugd
+Version:       0.16
+Release:       1
+Source0:       http://www.stud.uni-hamburg.de/~lennart/projects/ifplugd/ifplugd-0.16.tar.gz
+# Source0-md5: 56b920b51b05949f8a729e8c3e13ba70
+Source1:       %{name}.init
+License:       GPL
+Group:         Networking
+URL:           http://www.stud.uni-hamburg.de/users/lennart/projects/ifplugd/
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+BuildRequires: libdaemon-devel >= 0.2
+BuildRequires: lynx
+
+%define                _sbindir        /sbin
+
+%description
+ifplugd is a Linux daemon which will automatically configure your
+ethernet device when a cable is plugged in and automatically
+unconfigure it if the cable is pulled. This is useful on laptops with
+onboard network adapters, since it will only configure the interface
+when a cable is really connected.
+
+%prep
+%setup -q
+
+%build
+%configure
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
+
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+/sbin/chkconfig --add %{name}
+if [ -f /var/lock/subsys/%{name} ]; then
+        /etc/rc.d/init.d/%{name} restart 1>&2
+else
+        echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} service."
+fi
+
+%preun
+if [ "$1" = "0" ]; then
+        if [ -f /var/lock/subsys/%{name} ]; then
+                /etc/rc.d/init.d/%{name} stop 1>&2
+        fi
+        /sbin/chkconfig --del %{name}
+fi
+
+%files
+%defattr(644,root,root,755)
+%doc doc/README doc/NEWS doc/README.html doc/style.css
+%{_sbindir}/*
+%{_mandir}/man?/*
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
+%dir %{_sysconfdir}/ifplugd
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ifplugd/ifplugd.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ifplugd/ifplugd.action
+
+# end of file
This page took 0.080459 seconds and 4 git commands to generate.