[kernel] r7770 - in dists/trunk/ipw3945d: . debian
Jurij Smakov
jurij-guest at alioth.debian.org
Sun Nov 12 23:55:28 UTC 2006
Author: jurij-guest
Date: Mon Nov 13 00:55:27 2006
New Revision: 7770
Added:
dists/trunk/ipw3945d/
dists/trunk/ipw3945d/debian/
dists/trunk/ipw3945d/debian/README.Debian
dists/trunk/ipw3945d/debian/changelog
dists/trunk/ipw3945d/debian/compat
dists/trunk/ipw3945d/debian/control
dists/trunk/ipw3945d/debian/copyright
dists/trunk/ipw3945d/debian/dirs
dists/trunk/ipw3945d/debian/init (contents, props changed)
dists/trunk/ipw3945d/debian/ipw3945d.8
dists/trunk/ipw3945d/debian/logrotate
dists/trunk/ipw3945d/debian/modprobe
dists/trunk/ipw3945d/debian/postinst (contents, props changed)
dists/trunk/ipw3945d/debian/postrm (contents, props changed)
dists/trunk/ipw3945d/debian/rules (contents, props changed)
Log:
Move to a public location in trunk.
Added: dists/trunk/ipw3945d/debian/README.Debian
==============================================================================
--- (empty file)
+++ dists/trunk/ipw3945d/debian/README.Debian Mon Nov 13 00:55:27 2006
@@ -0,0 +1,18 @@
+There are two ways the ipw3945 daemon may be started/stopped in Debian.
+By implementing modprobe hooks, the daemon is made to start every time
+the ipw3945 kernel module is loaded, and removed right before the kernel
+module is removed. So you can use the commands
+
+ modprobe ipw3945
+ modprobe -r ipw3945
+
+to insert/remove ipw3945 kernel module, which will cause automatic
+starting/stopping of the ipw3945d daemon. However, when insertion of the
+module is triggered by udev early in the boot process, the daemon cannot
+be started, as at that point the file system is still mounted read-only,
+so the daemon cannot write its pid file. To overcome this problem, a
+regular /etc/init.d/ipw3945-daemon script is installed to start the
+daemon at the right time in the boot process (and shut it down on halt
+or reboot).
+
+ -- Jurij Smakov <jurij at debian.org> Fri, 10 Nov 2006 15:16:43 -0800
Added: dists/trunk/ipw3945d/debian/changelog
==============================================================================
--- (empty file)
+++ dists/trunk/ipw3945d/debian/changelog Mon Nov 13 00:55:27 2006
@@ -0,0 +1,6 @@
+ipw3945d (1.7.22-1) unstable; urgency=low
+
+ * Initial upload to Debian. Closes: #391686
+
+ -- Jurij Smakov <jurij at debian.org> Fri, 10 Nov 2006 19:31:57 -0800
+
Added: dists/trunk/ipw3945d/debian/compat
==============================================================================
--- (empty file)
+++ dists/trunk/ipw3945d/debian/compat Mon Nov 13 00:55:27 2006
@@ -0,0 +1 @@
+5
Added: dists/trunk/ipw3945d/debian/control
==============================================================================
--- (empty file)
+++ dists/trunk/ipw3945d/debian/control Mon Nov 13 00:55:27 2006
@@ -0,0 +1,22 @@
+Source: ipw3945d
+Section: non-free/net
+Priority: extra
+Maintainer: Debian Kernel Team <debian-kernel at lists.debian.org>
+Uploaders: Jurij Smakov <jurij at debian.org>
+Standards-Version: 3.7.2
+Build-Depends: debhelper (>= 5)
+
+Package: ipw3945d
+Architecture: i386 amd64
+Depends: adduser, lsb-base (>= 3.1), ${shlibs:Depends}, ${misc:Depends}
+Recommends: firmware-ipw3945
+Description: Binary userspace regulatory daemon for Intel PRO/Wireless 3945ABG cards
+ The regulatory daemon is responsible for controlling and configuring
+ aspects of the hardware required to operate the device within
+ compliance of various regulatory agencies. This includes controlling
+ which channels are allowed to do active/passive scanning, transmit
+ power levels, which channels are allowed to be transmitted on, and
+ support for IEEE 802.11h standard. It is required for operation of the
+ card when used with the ipw3945 Linux kernel driver.
+ .
+ Upstream URL: http://bughost.org/ipw3945/
Added: dists/trunk/ipw3945d/debian/copyright
==============================================================================
--- (empty file)
+++ dists/trunk/ipw3945d/debian/copyright Mon Nov 13 00:55:27 2006
@@ -0,0 +1,52 @@
+This package, containing the binary userspace regulatory
+daemon needed for operation of Intel/PRO Wireless 3945ABG
+card under Linux, has been created for Debian by Jurij
+Smakov <jurij at debian.org> on October 10th, 2006. The original
+upstream source have been downloaded from
+
+http://bughost.org/ipw3945/
+
+The software in this package is
+
+ Copyright (c) 2006, Intel Corporation.
+ All rights reserved.
+
+and is distributed under the terms of the following license:
+
+ Redistribution. Redistribution and use in binary form, without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ * Redistributions must reproduce the above copyright notice and the
+ following disclaimer in the documentation and/or other materials
+ provided with the distribution.
+ * Neither the name of Intel Corporation nor the names of its suppliers
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+ * No reverse engineering, decompilation, or disassembly of this software
+ is permitted.
+
+ Limited patent license. Intel Corporation grants a world-wide,
+ royalty-free, non-exclusive license under patents it now or hereafter
+ owns or controls to make, have made, use, import, offer to sell and
+ sell ("Utilize") this software, but solely to the extent that any
+ such patent is necessary to Utilize the software alone, or in
+ combination with an operating system licensed under an approved Open
+ Source license as listed by the Open Source Initiative at
+ http://opensource.org/licenses. The patent license shall not apply to
+ any other combinations which include this software. No hardware per
+ se is licensed hereunder.
+
+ DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+ BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ DAMAGE.
+
Added: dists/trunk/ipw3945d/debian/dirs
==============================================================================
--- (empty file)
+++ dists/trunk/ipw3945d/debian/dirs Mon Nov 13 00:55:27 2006
@@ -0,0 +1,2 @@
+var/run/ipw3945d
+var/log/ipw3945d
Added: dists/trunk/ipw3945d/debian/init
==============================================================================
--- (empty file)
+++ dists/trunk/ipw3945d/debian/init Mon Nov 13 00:55:27 2006
@@ -0,0 +1,125 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides: ipw3945d
+# 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
+
+. /lib/lsb/init-functions
+
+DAEMON_OWNER="Debian-ipw3945d:Debian-ipw3945d"
+DAEMON_BINARY="/sbin/ipw3945d"
+SYS_CMD_PERM="744"
+DAEMON_PID_DIR="/var/run/ipw3945d"
+DAEMON_PID_FILE="${DAEMON_PID_DIR}/ipw3945d.pid"
+DAEMON_LOG_FILE="/var/log/ipw3945d/ipw3945d.log"
+
+# Occasionally we will be started by a modprobe hook very early,
+# when the filesystem might not be mounted rw yet. In this case
+# daemon will fail to start, as it will be unable to write its
+# pid file. This function may be used to check for it.
+can_write_pid() {
+ check="${DAEMON_PID_DIR}/can_write"
+ if touch "${check}" > /dev/null 2>&1; then
+ res=0
+ rm -f "${check}"
+ else
+ res=1
+ fi
+ return "${res}"
+}
+
+# If the driver is loaded, some entries in the /sys tree should
+# appear. If they are not there, it might be that we just
+# need to wait a bit for them to appear and then adjust their
+# permissions and ownership appropriately.
+have_sys_entries() {
+ res=1
+ for delay in 0 1 2 4
+ do
+ sleep "${delay}"
+ cmd="$(echo /sys/bus/pci/drivers/ipw3945/*/cmd)"
+ if test -e "${cmd}"; then
+ chown "${DAEMON_OWNER}" ${cmd}
+ chmod "${SYS_CMD_PERM}" ${cmd}
+ res=0
+ break
+ fi
+ done
+ return "${res}"
+}
+
+# Check for a stale pid file and remove it, if present. If there is
+# a non-zero argument, the removal is silent (no warning emitted)
+remove_stale_pid() {
+ if test -e "${DAEMON_PID_FILE}"; then
+ pid=$(cat "${DAEMON_PID_FILE}")
+ msg="Removing stale pid file ${DAEMON_PID_FILE} (pid ${pid} not running)."
+ if ! kill -0 "${pid}" > /dev/null 2>&1; then
+ test -n "${1}" || log_warning_msg "${msg}"
+ rm -f "${DAEMON_PID_FILE}"
+ fi
+ fi
+}
+
+start_daemon() {
+ if have_sys_entries; then
+ remove_stale_pid
+ log_daemon_msg "Starting ipw3945 regulatory daemon" "ipw3945d"
+ start-stop-daemon --start --quiet --chuid "${DAEMON_OWNER}" \
+ --exec "${DAEMON_BINARY}" --pidfile "${DAEMON_PID_FILE}" \
+ --oknodo -- --pid-file=${DAEMON_PID_FILE} --quiet \
+ --log-file=${DAEMON_LOG_FILE} > /dev/null 2>&1
+ code=$?
+ log_end_msg ${code}
+ else
+ log_warning_msg "Not starting ipw3945 regulatory daemon, driver not loaded."
+ fi
+}
+
+stop_daemon () {
+ log_daemon_msg "Stopping ipw3945 regulatory daemon" "ipw3945d"
+ start-stop-daemon --stop --quiet --pidfile "${DAEMON_PID_FILE}" \
+ --signal HUP > /dev/null 2>&1
+ # Daemon does not clean up its pid file when exiting on a signal
+ remove_stale_pid quietly
+ log_end_msg 0
+}
+
+test -x "${DAEMON_BINARY}" || exit 0
+
+case "$1" in
+ start)
+ start_daemon
+ ;;
+ stop)
+ stop_daemon
+ ;;
+ restart|force-reload)
+ stop_daemon
+ start_daemon
+ ;;
+ # The modprobe-* targets are supposed to be used
+ # from modprobe hooks only.
+ modprobe-start)
+ can_write_pid || exit 0
+ start_daemon
+ ;;
+ modprobe-stop)
+ stop_daemon
+ # This target must always exit with code 1 due
+ # to the way it is called from the modprobe hook.
+ exit 1
+ ;;
+ *)
+ echo "Usage: ${0} {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+exit 0
Added: dists/trunk/ipw3945d/debian/ipw3945d.8
==============================================================================
--- (empty file)
+++ dists/trunk/ipw3945d/debian/ipw3945d.8 Mon Nov 13 00:55:27 2006
@@ -0,0 +1,51 @@
+.\" This manual page is Copyright (C) 2006 Jurij Smakov <jurij at debian.org>.
+.\" Freely distributable under the terms of the GPLv2, as published by the
+.\" Free Software Foundation.
+.TH IPW3945D "8" "October 2006" "ipw3945d 1.7.22" "System Administration Utilities"
+.SH NAME
+ipw3945d \- regulatory daemon for Intel/PRO Wireless 3945ABG cards
+.SH SYNOPSIS
+.B /sbin/ipw3945d
+.RB [\fIOPTIONS\fR]
+.SH DESCRIPTION
+ipw3945d is a binary userspace regulatory daemon, responsible for controlling
+and configuring aspects of the hardware required to operate the device within
+compliance of various regulatory agencies. This includes controlling which
+channels are allowed to do active/passive scanning, transmit power levels,
+which channels are allowed to be transmitted on, and support for IEEE 802.11h
+standard. It is required for operation of the card when used with the ipw3945
+Linux kernel driver.
+.SH OPTIONS
+.TP
+\fB\-\-quiet\fR
+Load silently (unless errors occur).
+.TP
+\fB\-\-timeout\fR=\fIVALUE\fR
+Wait up to VALUE seconds for driver to load.
+Default 0 (do not wait).
+A value of -1 means to wait forever.
+.TP
+\fB\-\-log\-file\fR=\fINAME\fR
+Specify log file (default is no log).
+.TP
+\fB\-\-pid\-file\fR=\fINAME\fR
+Specify pid file location
+(default \fB/var/run/ipw3945d.pid\fR).
+.TP
+\fB\-\-version\fR
+Display version information.
+.TP
+\fB\-\-foreground\fR
+Do not fork to background.
+.TP
+\fB\-\-kill\fR
+Kill any running ipw3945d instance and exit.
+.TP
+\fB\-\-help\fR
+Display a help message.
+.TP
+\fB\-\-isrunning\fR
+Check if already running. Returns 0 if yes.
+.SH COPYRIGHT
+.B ipw3945d
+is Copyright (C) 2005-2006 Intel Corporation. All rights reserved.
Added: dists/trunk/ipw3945d/debian/logrotate
==============================================================================
--- (empty file)
+++ dists/trunk/ipw3945d/debian/logrotate Mon Nov 13 00:55:27 2006
@@ -0,0 +1,4 @@
+/var/log/ipw3945d/ipw3945d.log {
+ rotate 6
+ weekly
+}
Added: dists/trunk/ipw3945d/debian/modprobe
==============================================================================
--- (empty file)
+++ dists/trunk/ipw3945d/debian/modprobe Mon Nov 13 00:55:27 2006
@@ -0,0 +1,2 @@
+install ipw3945 modprobe --ignore-install ipw3945 && /etc/init.d/ipw3945d modprobe-start
+remove ipw3945 /etc/init.d/ipw3945d modprobe-stop || modprobe -r --ignore-remove ipw3945
Added: dists/trunk/ipw3945d/debian/postinst
==============================================================================
--- (empty file)
+++ dists/trunk/ipw3945d/debian/postinst Mon Nov 13 00:55:27 2006
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+case "$1" in
+ configure)
+ adduser --quiet --system --no-create-home --force-badname \
+ --group Debian-ipw3945d
+ chown Debian-ipw3945d:Debian-ipw3945d /var/run/ipw3945d
+ chown Debian-ipw3945d:Debian-ipw3945d /var/log/ipw3945d
+ ;;
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+ *)
+ echo "${0} called with unknown argument ${1}"
+ exit 1
+ ;;
+esac
+#DEBHELPER#
Added: dists/trunk/ipw3945d/debian/postrm
==============================================================================
--- (empty file)
+++ dists/trunk/ipw3945d/debian/postrm Mon Nov 13 00:55:27 2006
@@ -0,0 +1,5 @@
+#!/bin/sh
+if [ "${1}" = "purge" ]; then
+ rm -rf /var/run/ipw3945d
+ rm -rf /var/log/ipw3945d
+fi
Added: dists/trunk/ipw3945d/debian/rules
==============================================================================
--- (empty file)
+++ dists/trunk/ipw3945d/debian/rules Mon Nov 13 00:55:27 2006
@@ -0,0 +1,43 @@
+#!/usr/bin/make -f
+
+ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
+ifeq (i386,$(strip $(ARCH)))
+ ARCHDIR := x86
+endif
+ifeq (amd64,$(strip $(ARCH)))
+ ARCHDIR := x86_64
+endif
+ifndef ARCHDIR
+ $(error Unsupported architecture $(ARCH))
+endif
+
+clean:
+ dh_testdir
+ dh_clean
+
+binary: binary-indep binary-arch
+
+binary-indep: build
+
+binary-arch: build install
+
+build:
+
+install:
+ dh_testdir
+ dh_testroot
+ dh_installdocs README.ipw3945d
+ dh_installchangelogs
+ dh_installdirs
+ dh_installinit -- start 39 S . start 36 0 6 .
+ dh_installmodules
+ dh_installman debian/ipw3945d.8
+ dh_installlogrotate
+# Install the right version, depending on the arch
+ dh_install $(ARCHDIR)/ipw3945d /sbin
+ dh_shlibdeps
+ dh_installdeb
+ dh_fixperms
+ dh_compress
+ dh_gencontrol
+ dh_builddeb
More information about the Kernel-svn-changes
mailing list