[svn] r4849 - trunk/rpms/ipw3945d
packagers at lists.rpmforge.net
packagers at lists.rpmforge.net
Mon Oct 23 13:19:12 CEST 2006
Author: thias
Date: 2006-10-23 13:19:12 +0200 (Mon, 23 Oct 2006)
New Revision: 4849
Added:
trunk/rpms/ipw3945d/ipw3945d.init
Modified:
trunk/rpms/ipw3945d/ipw3945d.spec
Log:
Include init script for ipw3945d.
Added: trunk/rpms/ipw3945d/ipw3945d.init
===================================================================
--- trunk/rpms/ipw3945d/ipw3945d.init (rev 0)
+++ trunk/rpms/ipw3945d/ipw3945d.init 2006-10-23 11:19:12 UTC (rev 4849)
@@ -0,0 +1,69 @@
+#!/bin/sh
+# $Id$
+#
+# Init file for IPW3945 regulatory daemon
+#
+# chkconfig: 345 13 87
+# description: Intel Pro Wireless 3945 regulatory daemon
+#
+# processname: ipw3945d
+# pidfile: /var/run/ipw3945d.pid
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Source networking configuration.
+. /etc/sysconfig/network
+
+# Check that networking is up.
+[ ${NETWORKING} = "no" ] && exit 0
+
+RETVAL=0
+prog=ipw3945d
+OPTIONS="--quiet --timeout=-1"
+
+start()
+{
+ echo -n $"Starting $prog: "
+ daemon /sbin/ipw3945d $OPTIONS
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
+}
+
+stop()
+{
+ echo -n $"Stopping $prog: "
+ killproc /sbin/ipw3945d
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ condrestart)
+ if [ -f /var/lock/subsys/$prog ]; then
+ stop
+ start
+ fi
+ ;;
+ status)
+ status /sbin/ipw3945d
+ RETVAL=$?
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart|condrestart|status}"
+ RETVAL=1
+esac
+exit $RETVAL
+
Property changes on: trunk/rpms/ipw3945d/ipw3945d.init
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/rpms/ipw3945d/ipw3945d.spec
===================================================================
--- trunk/rpms/ipw3945d/ipw3945d.spec 2006-10-23 10:16:03 UTC (rev 4848)
+++ trunk/rpms/ipw3945d/ipw3945d.spec 2006-10-23 11:19:12 UTC (rev 4849)
@@ -9,11 +9,12 @@
Summary: Regulatory Daemon for Intel® PRO/Wireless 3945 network adaptors
Name: ipw3945d
Version: 1.7.22
-Release: 1
+Release: 2
License: Distributable
Group: System Environment/Kernel
URL: http://bughost.org/ipw3945/
-Source: http://bughost.org/ipw3945/daemon/ipw3945d-%{version}.tgz
+Source0: http://bughost.org/ipw3945/daemon/ipw3945d-%{version}.tgz
+Source1: ipw3945d.init
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
ExclusiveArch: i386 x86_64
@@ -34,14 +35,32 @@
%install
%{__rm} -rf %{buildroot}
+# Install binary daemon
%ifarch i386
%{__install} -D -p -m 0755 x86/ipw3945d %{buildroot}/sbin/ipw3945d
%endif
%ifarch x86_64
%{__install} -D -p -m 0755 x86_64/ipw3945d %{buildroot}/sbin/ipw3945d
%endif
+# Install init script
+%{__install} -D -p -m 0755 %{SOURCE1} \
+ %{buildroot}%{_sysconfdir}/rc.d/init.d/ipw3945d
+%post
+/sbin/chkconfig --add ipw3945d
+
+%preun
+if [ $1 -eq 0 ]; then
+ /sbin/service ipw3945d stop &>/dev/null || :
+ /sbin/chkconfig --del ipw3945d
+
+%postun
+if [ $1 -ge 1 ]; then
+ /sbin/service ipw3945d condrestart &>/dev/null || :
+fi
+
+
%clean
%{__rm} -rf %{buildroot}
@@ -49,10 +68,14 @@
%files
%defattr(-, root, root, 0755)
%doc LICENSE.ipw3945d README.ipw3945d
+%{_sysconfdir}/rc.d/init.d/ipw3945d
/sbin/ipw3945d
%changelog
+* Mon Oct 23 2006 Matthias Saou <http://freshrpms.net/> 1.7.22-2
+- Include init script, thanks to Stefan Becker.
+
* Mon Oct 9 2006 Matthias Saou <http://freshrpms.net/> 1.7.22-1
- Update to 1.7.22.
More information about the svn-commits
mailing list