[kernel] r7604 - people/jurij/ipw3945-daemon/debian

Jurij Smakov jurij-guest at costa.debian.org
Fri Oct 13 15:49:58 UTC 2006


Author: jurij-guest
Date: Fri Oct 13 15:49:57 2006
New Revision: 7604

Modified:
   people/jurij/ipw3945-daemon/debian/changelog
   people/jurij/ipw3945-daemon/debian/default
   people/jurij/ipw3945-daemon/debian/init
   people/jurij/ipw3945-daemon/debian/postinst
   people/jurij/ipw3945-daemon/debian/rules

Log:
Lots of updates, works out of the box now.


Modified: people/jurij/ipw3945-daemon/debian/changelog
==============================================================================
--- people/jurij/ipw3945-daemon/debian/changelog	(original)
+++ people/jurij/ipw3945-daemon/debian/changelog	Fri Oct 13 15:49:57 2006
@@ -1,5 +1,5 @@
 ipw3945-daemon (1.7.22-1) unstable; urgency=low
 
-  * Initial upload to Debian.
+  * Initial upload to Debian. Closes: #391686
 
  -- Jurij Smakov <jurij at debian.org>  Tue, 10 Oct 2006 20:14:33 -0700

Modified: people/jurij/ipw3945-daemon/debian/default
==============================================================================
--- people/jurij/ipw3945-daemon/debian/default	(original)
+++ people/jurij/ipw3945-daemon/debian/default	Fri Oct 13 15:49:57 2006
@@ -2,4 +2,4 @@
 DAEMON_BINARY='/sbin/ipw3945d'
 DAEMON_OWNER='Debian-ipw3945d:Debian-ipw3945d'
 SYS_CMD_PERM='744'
-DAEMON_PID='/var/run/ipw3945d.pid'
+DAEMON_PID='/var/run/ipw3945-daemon/ipw3945d.pid'

Modified: people/jurij/ipw3945-daemon/debian/init
==============================================================================
--- people/jurij/ipw3945-daemon/debian/init	(original)
+++ people/jurij/ipw3945-daemon/debian/init	Fri Oct 13 15:49:57 2006
@@ -1,4 +1,15 @@
-#!/bin/sh -x
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides:          ipw3945-daemon
+# Required-Start:    mountkernfs $local_fs
+# Required-Stop:     $local_fs
+# Default-Start:     S
+# Default-Stop:      0 6
+# Short-Description: Starts Intel regulatory daemon (ipw3945d) 
+# Description:       Starts the binary userspace regulatory daemon, required
+#                    for operation of Intel/PRO Wireless 3945ABG cards
+### END INIT INFO
 
 DAEMON_RUN='yes'
 DAEMON_OWNER='Debian-ipw3945d:Debian-ipw3945d'
@@ -17,24 +28,26 @@
   else
     echo -n "Starting ipw3945 regulatory daemon: ipw3945d"
     # Fix permissions
-    chown ${DAEMON_OWNER} ${cmd}
-    chmod ${SYS_CMD_PERM} ${cmd}
-    start-stop-daemon --start --quiet --chuid ${DAEMON_OWNER}        \
-                      --exec ${DAEMON_BINARY} --pidfile ${DAEMON_PID} \
-		      -- --pid-file=${DAEMON_PID}
+    chown "${DAEMON_OWNER}" ${cmd}
+    chmod "${SYS_CMD_PERM}" ${cmd}
+    start-stop-daemon --start --quiet --chuid "${DAEMON_OWNER}"           \
+                      --exec "${DAEMON_BINARY}" --pidfile "${DAEMON_PID}" \
+		      -- --pid-file=${DAEMON_PID} --quiet
     echo "."
   fi
 }
 
 stop_daemon () {
   echo -n "Stopping ipw3945 regulatory daemon: ipw3945d"
-  start-stop-daemon --stop --quiet --pidfile ${DAEMON_PID} \
-                    --signal TERM > /dev/null 2>&1 || rm -f ${DAEMON_PID}
+  start-stop-daemon --stop --quiet --pidfile "${DAEMON_PID}" \
+                    --signal TERM > /dev/null 2>&1
+# Daemon does not remove its own PID file, so we do it
+  test -f "${DAEMON_PID}" && rm -f "${DAEMON_PID}"
   echo "."
 }
 
-test -x ${DAEMON_BIN} || exit 0
-test ${DAEMON_RUN} = 'yes' || exit 0
+test -x "${DAEMON_BINARY}" || exit 0
+test "${DAEMON_RUN}" = 'yes' || exit 0
 
 case "$1" in
   start)

Modified: people/jurij/ipw3945-daemon/debian/postinst
==============================================================================
--- people/jurij/ipw3945-daemon/debian/postinst	(original)
+++ people/jurij/ipw3945-daemon/debian/postinst	Fri Oct 13 15:49:57 2006
@@ -4,7 +4,7 @@
   configure)
     adduser --quiet --system --no-create-home --force-badname \
             --group Debian-ipw3945d
-    chmod Debian-ipw3945d:Debian-ipw3945d /var/run/ipw3945d-daemon
+    chown Debian-ipw3945d:Debian-ipw3945d /var/run/ipw3945-daemon
     #DEBHELPER#
     ;;
   abort-upgrade|abort-remove|abort-deconfigure)

Modified: people/jurij/ipw3945-daemon/debian/rules
==============================================================================
--- people/jurij/ipw3945-daemon/debian/rules	(original)
+++ people/jurij/ipw3945-daemon/debian/rules	Fri Oct 13 15:49:57 2006
@@ -29,7 +29,14 @@
 	dh_installdocs README.ipw3945d
 	dh_installchangelogs
 	dh_installdirs
-	dh_installinit
+# 	We need to start before S40networking on runlevel S and
+# 	die after S35networking on runlevels 0 and 6. In a pretty
+# 	retarded fashion, the scripts are called with a 'stop'
+# 	argument on runlevels 0 and 6 even if they starts with 'S'.
+# 	Therefore, for these runlevels we need to install *start*
+# 	symlinks, with sequence number greater than that of
+# 	networking.
+	dh_installinit -- start 39 S . start 36 0 6 .
 	dh_installman debian/ipw3945d.8
 #	Install the right version, depending on the arch
 	dh_install $(ARCHDIR)/ipw3945d /sbin



More information about the Kernel-svn-changes mailing list