diff options
author | Oliver Kurth <oku@debian.org> | 2004-12-21 15:00:04 -0800 |
---|---|---|
committer | Andrew Shadura <andrew.shadura@collabora.co.uk> | 2016-06-21 11:57:25 +0200 |
commit | d33d130eee0ca26d863037a0bac41414cd1e7963 (patch) | |
tree | 0e927c62d5387857eb7374f3cc3aaf3ab299fa6a /debian | |
parent | 0af3fe8aecc7ee52a6ee0eb926aab985513c4204 (diff) |
Imported Debian patch 0.26-1
Diffstat (limited to 'debian')
-rw-r--r-- | debian/apm/ifplugd | 22 | ||||
-rw-r--r-- | debian/changelog | 207 | ||||
-rw-r--r-- | debian/compat | 1 | ||||
-rw-r--r-- | debian/control | 30 | ||||
-rw-r--r-- | debian/copyright | 25 | ||||
-rw-r--r-- | debian/dirs | 7 | ||||
-rw-r--r-- | debian/docs | 1 | ||||
-rw-r--r-- | debian/hotplug | 45 | ||||
-rw-r--r-- | debian/ifplugd.action | 30 | ||||
-rw-r--r-- | debian/ifplugd.config | 72 | ||||
-rw-r--r-- | debian/ifplugd.init | 116 | ||||
-rw-r--r-- | debian/ifplugd.links | 2 | ||||
-rw-r--r-- | debian/ifplugd.postinst | 73 | ||||
-rw-r--r-- | debian/ifplugd.postrm | 53 | ||||
-rw-r--r-- | debian/ifplugd.preinst | 31 | ||||
-rw-r--r-- | debian/ifplugd.templates | 54 | ||||
-rw-r--r-- | debian/ifstatus | 4 | ||||
-rw-r--r-- | debian/ifupdown.action | 11 | ||||
-rwxr-xr-x | debian/rules | 97 | ||||
-rw-r--r-- | debian/shlibs.local | 1 |
20 files changed, 882 insertions, 0 deletions
diff --git a/debian/apm/ifplugd b/debian/apm/ifplugd new file mode 100644 index 0000000..e2ecb17 --- /dev/null +++ b/debian/apm/ifplugd @@ -0,0 +1,22 @@ +#!/bin/sh +# suspend ifplugd + +[ -f /etc/default/ifplugd ] || exit 0 +. /etc/default/ifplugd +[ -z "${SUSPEND_ACTION}" -o x"${SUSPEND_ACTION}" = x"none" ] && exit 0 + +if [ ${SUSPEND_ACTION} = "suspend" ] ; then + RESUME_ACTION="resume" +elif [ ${SUSPEND_ACTION} = "stop" ] ; then + RESUME_ACTION="start" +else + exit 0 +fi + +if [ "$1" = suspend ]; then + /etc/init.d/ifplugd ${SUSPEND_ACTION} +elif [ "$1" = resume ] && [ "$2" != standby ]; then + /etc/init.d/ifplugd ${RESUME_ACTION} +fi + +exit 0 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..be0e951 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,207 @@ +ifplugd (0.26-1) unstable; urgency=low + + * new upstream + * depends and build-depends on libdaemon{0,-dev} >= 0.7 + + -- Oliver Kurth <oku@debian.org> Tue, 21 Dec 2004 15:00:04 -0800 + +ifplugd (0.25-2) unstable; urgency=low + + * INTERFACES and HOTPLUG_INTERFACES are now empty by default + (closes: #256639) + * fixed per iface ARGS handling for ifaces containing dashes + (closes: #245952) + * build depend on lynx|lynx-ssl (for backports) (closes: #265978) + * allow more than one iface for /etc/init.d/ifplugd start + (closes: #281337) + + -- Oliver Kurth <oku@debian.org> Wed, 15 Dec 2004 17:09:03 -0800 + +ifplugd (0.25-1) unstable; urgency=low + + * new upstream (0.24 skipped due to problems with IFF method) + + -- Oliver Kurth <oku@debian.org> Tue, 11 May 2004 15:38:15 +0200 + +ifplugd (0.23-1) unstable; urgency=low + + * new upstream (closes: #241041, init script keeps references to tty1) + * depends and build-depends on libdaemon{0,-dev} >= 0.6 + + -- Oliver Kurth <oku@debian.org> Wed, 07 Apr 2004 23:17:30 +0200 + +ifplugd (0.22-1) unstable; urgency=low + + * new upstream + * depends and build-depends on libdaemon{0,-dev} >= 0.5 + * ifstatus has been replaced by ifplugstatus, we provide a script + with the old name that outputs a message and then calls ifplugstatus + * use init script instead of start-stop-daemon directly in hotplug script + + -- Oliver Kurth <oku@debian.org> Thu, 04 Mar 2004 20:55:33 -0800 + +ifplugd (0.21b-2) unstable; urgency=low + + * build depends on pkg-config + + -- Oliver Kurth <oku@debian.org> Mon, 02 Feb 2004 22:52:42 +0100 + +ifplugd (0.21b-1) unstable; urgency=low + + * new upstream + * added feature list to description, including the mentioning of + wireless support (closes: #226314) + * removed obsolete comments from hotplug script (closes: #223314) + * remove symlinks in /etc/apm/{other.d,resume.d,suspend.d} on purge + (closes: #228216) + * depends and build-depends on libdaemon{0,-dev} >= 0.4 + + -- Oliver Kurth <oku@debian.org> Tue, 27 Jan 2004 20:17:12 +0100 + +ifplugd (0.20-2) unstable; urgency=low + + * man page typo fix (closes: #219780) + * minor change to debconf questions (closes: #219746) + * includes SUPPORTED_CARDS again + * mention that it works with eepro100 and 2.4.20 + (closes: #196020) + + -- Oliver Kurth <oku@debian.org> Thu, 20 Nov 2003 13:47:30 +0100 + +ifplugd (0.20-1) unstable; urgency=low + + * new upstream + * scripts go to /etc/apm/scripts.d, _not_ /etc/apm/script.d + (closes: #219196, #219488) + * remove dynamically created conf files in postrm script + (closes: #219489) + * hotplug script now accepts all eth*|wlan*|ath* devices + (ath* is for devices using the madwifi driver) + + -- Oliver Kurth <oku@debian.org> Wed, 19 Nov 2003 18:38:04 +0100 + +ifplugd (0.19-2) unstable; urgency=low + + * use --wait-on-kill on stopping daemon in init script + (closes: #218994) + * more appropriate note in /etc/default/ifplugd + (closes: #218993) + * deleted comment in hotplug script (closes: #218997) + * removed "--wait-on-fork" in hotplug script + (closes: #218996) + * create /etc/apm/scripts.d/ in preinst (closes: #219046) + + -- Oliver Kurth <oku@debian.org> Mon, 03 Nov 2003 22:27:03 +0100 + +ifplugd (0.19-1) unstable; urgency=low + + * new upstream + * changed URL and email in copyright, as requested by upstream + * added hotplug script (closes: #213608) + * lowered priority for suspend action, defaults to 'stop' + * moved apm script to /etc/apm/script.d/, symlinked + to /etc/apm/{suspend.d,resume.d,other.d} (closes: #213852) + * provide run-parts directory (closes: #186239) + + -- Oliver Kurth <oku@debian.org> Thu, 30 Oct 2003 22:38:59 +0100 + +ifplugd (0.17b-1) unstable; urgency=low + + * new upstream (closes: #205277, #213205) + * now uses debconf, so admin can choose interfaces (closes: #202378) + * improved the description of the "auto" magic interface name + (for debconf, not in ifplugd.conf as suggested). + (Closes: #202392) + * we now use /etc/default/ifplugd (but not as intended in + #201880): it is just used for the apm script. + + -- Oliver Kurth <oku@debian.org> Fri, 18 Jul 2003 20:51:09 +0200 + +ifplugd (0.15-1) unstable; urgency=low + + * new upstream version (closes: #202060) + - closes: #200693 (wrong umask settings) + - closes: #201906 (better explain arguments to ifplugd.action) + - now depends on libdaemon + + -- Oliver Kurth <oku@debian.org> Fri, 18 Jul 2003 20:51:09 +0200 + +ifplugd (0.13-1) unstable; urgency=low + + * new upstream version + * better wherami handling (closes: #178672) + * versioned recommends for ifupdown because of locking + (see: #179028) + * changed maintainer address to oku@debian.org + + -- Oliver Kurth <oku@debian.org> Tue, 4 Mar 2003 22:01:36 +0100 + +ifplugd (0.10-1) unstable; urgency=low + + * new upstream version + - implements option '-w': ifplugd waits until interface is up upon + start of daemon. (Closes: #168237) + + -- Oliver Kurth <oku@masqmail.cx> Tue, 19 Nov 2002 16:46:12 +0100 + +ifplugd (0.9-2) unstable; urgency=low + + * include <stdlib.h> in ifstatus.c (closes: #168045) + + -- Oliver Kurth <oku@masqmail.cx> Mon, 11 Nov 2002 12:25:37 +0100 + +ifplugd (0.9-1) unstable; urgency=low + + * new upstream version. + - linefeed in version.h (closes: #168045) + - added a patch file for 8139too + - added a list of supported drivers + see NEWS for more + * integrate with whereami for location detection (closes: #167918) + + -- Oliver Kurth <oku@masqmail.cx> Fri, 08 Nov 2002 14:55:10 +0100 + +ifplugd (0.8-1) unstable; urgency=low + + * new upstream version. + (this includes official upstream changes for #164380,#165583 + and the new utility 'ifstatus') + + -- Oliver Kurth <oku@masqmail.cx> Sat, 26 Oct 2002 19:38:16 +0200 + +ifplugd (0.6-2) unstable; urgency=low + + * use SIOCDEVPRIVATE+1 if SIOCGMIIPHY fails + (hopefully closes: #164380) + * use /bin/echo instead of echo (closes: #165583) + + -- Oliver Kurth <oku@masqmail.cx> Tue, 22 Oct 2002 14:56:58 +0200 + +ifplugd (0.6-1) unstable; urgency=low + + * new upstream version + * recommends ifupdown + * use '=' instead of '==' and 'set -e' in ifplugd.action + (closes: #164886) + + -- Oliver Kurth <oku@masqmail.cx> Tue, 15 Oct 2002 22:00:06 +0200 + +ifplugd (0.5-1) unstable; urgency=low + + * new upstream version + * added a man page + + -- Oliver Kurth <oku@masqmail.cx> Mon, 7 Oct 2002 21:04:04 +0200 + +ifplugd (0.4-1) unstable; urgency=low + + * new upstream version + + -- Oliver Kurth <oku@masqmail.cx> Wed, 2 Oct 2002 23:53:42 +0200 + +ifplugd (0.2-1) unstable; urgency=low + + * Initial Release. + + -- Oliver Kurth <oku@masqmail.cx> Mon, 30 Sep 2002 23:59:28 +0200 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +4 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..b69d109 --- /dev/null +++ b/debian/control @@ -0,0 +1,30 @@ +Source: ifplugd +Section: net +Priority: optional +Maintainer: Oliver Kurth <oku@debian.org> +Build-Depends: debhelper (>> 4.0.0), libdaemon-dev (>= 0.7), lynx | lynx-ssl, pkg-config +Standards-Version: 3.6.1 + +Package: ifplugd +Architecture: any +Depends: ${shlibs:Depends}, debconf (>> 0.5) +Recommends: ifupdown (>= 0.6.4-4.2) +Description: A configuration daemon for ethernet devices + ifplugd is a 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. + . + Some features: + * May beep when the cable is unplugged, plugged, the interface + configuration succeeded or failed. + * Syslog support + * small + * Multiple ethernet interface support + * Support for wireless networking. Whenever an association to an AP + is detected the network is configured. Have a look on waproamd + if you need a facility to configure WEP keys before AP + associations succeed. + * Compatibility mode for network devices which do not support cable + detection diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..dcb09e7 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,25 @@ +This package was debianized by Oliver Kurth <oku@masqmail.cx> on +Mon, 30 Sep 2002 23:59:28 +0200. + +It was downloaded from http://0pointer.de/lennart/projects/ifplugd/ + +Upstream Author: Lennart Poettering <mzvscyhtq (at) 0pointer (dot) de> +Copyright: + + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Please see /usr/share/common-licenses/GPL for the complete license. + diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..9e610d3 --- /dev/null +++ b/debian/dirs @@ -0,0 +1,7 @@ +usr/sbin +etc/apm/scripts.d +etc/apm/event.d +etc/apm/suspend.d +etc/apm/resume.d +etc/apm/other.d +etc/hotplug.d/net diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +README diff --git a/debian/hotplug b/debian/hotplug new file mode 100644 index 0000000..ada0b50 --- /dev/null +++ b/debian/hotplug @@ -0,0 +1,45 @@ +#!/bin/sh +# hotplug agent script + +DAEMON_NAME=ifplugd + +DAEMON=/usr/sbin/$DAEMON_NAME +CFG=/etc/default/$DAEMON_NAME + +[ -x $DAEMON ] || exit 0 + +HOTPLUGFUNCS=/etc/hotplug/hotplug.functions +[ -f $HOTPLUGFUNCS ] || exit 1 +. $HOTPLUGFUNCS +DEBUG=yes export DEBUG + +[ "$INTERFACE" ] || { mesg Bad invocation: \$INTERFACE is not set ; exit 1 ; } +case "$INTERFACE" in + # ath* is for Atheros devices using the madwifi driver + # pan* is for the Affix Bluetooth stack + eth*|wlan*|ath*|pan*) + : + ;; + *) + exit 0 + ;; +esac + +[ -f $CFG ] || { mesg No $DAEMON_NAME configuration file ; exit 1 ; } +. $CFG + +case $ACTION in +add|register) + for IF in $HOTPLUG_INTERFACES ; do + if [ "$INTERFACE" = "$IF" -o "$IF" = "all" ] ; then + debug_mesg Invoking $DAEMON_NAME for $INTERFACE + /etc/init.d/$DAEMON_NAME start $INTERFACE + break + fi + done + ;; +remove|unregister) + debug_mesg Stopping $DAEMON_NAME for $INTERFACE + /etc/init.d/$DAEMON_NAME stop $INTERFACE + ;; +esac diff --git a/debian/ifplugd.action b/debian/ifplugd.action new file mode 100644 index 0000000..3619237 --- /dev/null +++ b/debian/ifplugd.action @@ -0,0 +1,30 @@ +#!/bin/sh +# $Id: ifplugd.action 43 2003-09-13 11:25:11Z lennart $ + +# This file is part of ifplugd. +# +# ifplugd is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# ifplugd is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with ifplugd; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + +set -e + +case "$2" in +up|down) + run-parts --arg="$1" --arg="$2" /etc/ifplugd/action.d/ + ;; +*) + echo "ifplugd.action: Incorrect action argument" >&2 + exit 1 + ;; +esac diff --git a/debian/ifplugd.config b/debian/ifplugd.config new file mode 100644 index 0000000..08962d1 --- /dev/null +++ b/debian/ifplugd.config @@ -0,0 +1,72 @@ +#!/bin/bash -e + +# Source debconf library. +. /usr/share/debconf/confmodule + +db_version 2.0 + +# This conf script is capable of backing up +db_capb backup + +# Cool. ifplugd.conf just sets environment, so we +# can use it and convert from and to debconf without +# loss. +CONFIGFILE=/etc/ifplugd/ifplugd.conf +if [ -f ${CONFIGFILE} ] ; then + . ${CONFIGFILE} + + db_set ifplugd/args ${ARGS} + db_set ifplugd/interfaces ${INTERFACES} +fi + +DEFAULTFILE=/etc/default/ifplugd +if [ -f ${DEFAULTFILE} ] ; then + . ${DEFAULTFILE} + + db_set ifplugd/suspend_action ${SUSPEND_ACTION} + db_set ifplugd/hotplug_interfaces ${HOTPLUG_INTERFACES} + + # we move those to /etc/default/ifplugd since 0.19: + db_set ifplugd/args ${ARGS} + db_set ifplugd/interfaces ${INTERFACES} +fi + +STATE=1 +while [ "$STATE" != 0 -a "$STATE" != 5 ]; do + case "$STATE" in + 1) + db_input medium ifplugd/interfaces || true + ;; + 2) + db_input medium ifplugd/hotplug_interfaces || true + ;; + 3) + db_input medium ifplugd/args || true + ;; + 4) + db_input low ifplugd/suspend_action || true + ;; + esac + + if db_go; then + STATE=$(($STATE + 1)) + else + STATE=$(($STATE - 1)) + fi +done + +# dpkg-reconfigure does not stop services: +# (cause of Bug#151528) +# in debhelper version < 1.2.9 + +DH_VERSION=`dpkg -l debconf | awk ' /^ii/ { print $3 }'` + +if dpkg --compare-versions $DH_VERSION lt "1.2.9" ; then + if [ x"$1" = x"reconfigure" ] ; then + if [ -x "/etc/init.d/ifplugd" ]; then + /etc/init.d/ifplugd stop || true + fi + fi +fi + +exit 0 diff --git a/debian/ifplugd.init b/debian/ifplugd.init new file mode 100644 index 0000000..606d283 --- /dev/null +++ b/debian/ifplugd.init @@ -0,0 +1,116 @@ +#!/bin/bash +# $Id: ifplugd.init.in 43 2003-09-13 11:25:11Z lennart $ + +# This file is part of ifplugd. +# +# ifplugd is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# ifplugd is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with ifplugd; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + +# ifplugd Brings up/down network automatically +# +# chkconfig: 2345 11 89 +# description: Brings networks interfaces up and down automatically when \ +# the cable is removed / inserted +# +# processname: /usr/sbin/ifplugd +# config: /etc/ifplugd/ifplugd.conf + +### BEGIN INIT INFO +# Provides: ifplugd +# Required-Start: $network +# X-UnitedLinux-Should-Start: +# Required-Stop: $network +# X-UnitedLinux-Should-Stop: $ +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 +# Short-Description: ifplugd daemon providing +# Description: Start ifplugd to allow XY and provide YZ +# continued on second line by '#<TAB>' +# should contain enough info for the runlevel editor +# to give admin some idea what this service does and +# what it's needed for ... +# (The Short-Description should already be a good hint.) +### END INIT INFO + +CFG=/etc/default/ifplugd + +IFPLUGD=/usr/sbin/ifplugd +test -x $IFPLUGD || exit 0 + +if [ `id -u` != "0" ] && [ "$1" = "start" -o "$1" = "stop" ] ; then + echo "You must be root to start, stop or restart ifplugd." + exit 1 +fi + +[ -f $CFG ] && . $CFG + +VERB="$1" +shift + +[ $# -ne 0 ] && INTERFACES="$@" + +[ "x$INTERFACES" = "xauto" -o "x$INTERFACES" = "xall" ] && INTERFACES="`cat /proc/net/dev | awk '{ print $1 }' | egrep '^(eth|wlan)' | cut -d: -f1`" + +case "$VERB" in + start) + echo -n "Starting Network Interface Plugging Daemon:" + for IF in $INTERFACES ; do + IF1=$(echo $IF | sed "s/-/_/") + A=$(eval echo \$\{ARGS_${IF1}\}) + [ -z "$A" ] && A="$ARGS" + $IFPLUGD -i $IF $A + echo -n " $IF" + done + echo "." + ;; + stop) + echo -n "Stopping Network Interface Plugging Daemon:" + for IF in $INTERFACES ; do + $IFPLUGD -k --wait-on-kill -i $IF + echo -n " $IF" + done + echo "." + ;; + status) + for IF in $INTERFACES ; do + $IFPLUGD -c -i $IF + done + ;; + suspend) + echo -n "Suspending Network Interface Plugging Daemon:" + for IF in $INTERFACES ; do + $IFPLUGD -S -i $IF + echo -n " $IF" + done + echo "." + ;; + resume) + echo -n "Resuming Network Interface Plugging Daemon:" + for IF in $INTERFACES ; do + $IFPLUGD -R -i $IF + echo -n " $IF" + done + echo "." + ;; + force-reload|restart) + $0 stop $INTERFACES + sleep 3 + $0 start $INTERFACES + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload|status|suspend|resume}" + exit 1 +esac + +exit 0 diff --git a/debian/ifplugd.links b/debian/ifplugd.links new file mode 100644 index 0000000..81d0877 --- /dev/null +++ b/debian/ifplugd.links @@ -0,0 +1,2 @@ +usr/share/man/man8/ifplugstatus.8.gz usr/share/man/man8/ifstatus.8.gz + diff --git a/debian/ifplugd.postinst b/debian/ifplugd.postinst new file mode 100644 index 0000000..fc9bf89 --- /dev/null +++ b/debian/ifplugd.postinst @@ -0,0 +1,73 @@ +#!/bin/sh -e + +# source debconf library +. /usr/share/debconf/confmodule + +CONFIGFILE=/etc/ifplugd/ifplugd.conf +CONFIGTMP=${CONFIGFILE}.tmp + +DEFAULTFILE=/etc/default/ifplugd +DEFAULTTMP=${DEFAULTFILE}.tmp + +write_db_conf (){ + + rm -f ${CONFIGTMP} + + echo "# this file is deprecated - use /etc/default/ifplugd." >> ${CONFIGTMP} + + mv ${CONFIGTMP} ${CONFIGFILE} +} + +write_default (){ + + rm -f ${DEFAULTTMP} + + ( + echo "# This file may be changed either manually or by running dpkg-reconfigure." + echo "#" + echo "# N.B.: dpkg-reconfigure deletes everything from this file except for" + echo "# the assignments to variables INTERFACES, HOTPLUG_INTERFACES, ARGS and" + echo "# SUSPEND_ACTION. When run it uses the current values of those variables" + echo "# as their default values, thus preserving the administrator's changes." + ) >> $DEFAULTTMP + + db_get ifplugd/interfaces || true + echo "INTERFACES=\"$RET\"" >> $DEFAULTTMP + db_get ifplugd/hotplug_interfaces || true + echo "HOTPLUG_INTERFACES=\"$RET\"" >> $DEFAULTTMP + db_get ifplugd/args || true + echo "ARGS=\"$RET\"" >> $DEFAULTTMP + db_get ifplugd/suspend_action || true + echo "SUSPEND_ACTION=\"$RET\"" >> $DEFAULTTMP + + mv ${DEFAULTTMP} ${DEFAULTFILE} +} + +case "$1" in + configure) + + write_db_conf + write_default + if [ ! "$2" ] || [ "$2" = "<unknown>" ] ; then + # Fresh install + for F in /etc/apm/suspend.d/20ifplugd \ + /etc/apm/resume.d/80ifplugd /etc/apm/other.d/50ifplugd ; do + [ -e $F ] && mv -f $F ${F}.dpkg-old + ln -nsf ../scripts.d/ifplugd $F + done + + fi + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; +esac + +db_stop + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + diff --git a/debian/ifplugd.postrm b/debian/ifplugd.postrm new file mode 100644 index 0000000..13b1ac1 --- /dev/null +++ b/debian/ifplugd.postrm @@ -0,0 +1,53 @@ +#! /bin/sh +# postrm script for #PACKAGE# +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * <postrm> `remove' +# * <postrm> `purge' +# * <old-postrm> `upgrade' <new-version> +# * <new-postrm> `failed-upgrade' <old-version> +# * <new-postrm> `abort-install' +# * <new-postrm> `abort-install' <old-version> +# * <new-postrm> `abort-upgrade' <old-version> +# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge) + + rm -f /etc/default/ifplugd + rm -f /etc/ifplugd/ifplugd.conf /etc/ifplugd/ifplugd.conf.dpkg-old + rm -f /etc/ifplugd/action.d/ifupdown.dpkg-old + + # remove left overs from 0.19 (was a typo bug): + rm -f /etc/apm/script.d/ifplugd /etc/apm/script.d/ifplugd.dpkg-old + [ -d /etc/apm/script.d ] && rmdir --ignore-fail-on-non-empty /etc/apm/script.d/ + + # remove symlinks created in preinst: + for f in /etc/apm/suspend.d/20ifplugd /etc/apm/resume.d/80ifplugd /etc/apm/other.d/50ifplugd ; do + rm -f $f + done + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/ifplugd.preinst b/debian/ifplugd.preinst new file mode 100644 index 0000000..fe0d24a --- /dev/null +++ b/debian/ifplugd.preinst @@ -0,0 +1,31 @@ +#!/bin/sh +set -e + +case "$1" in + upgrade) + ### Move old apm hook script if appropriate ### + if [ -f /etc/apm/event.d/20ifplugd ] ; then + [ -d /etc/apm/scripts.d/ ] || mkdir /etc/apm/scripts.d/ + if [ -f /etc/apm/scripts.d/ifplugd ] ; then + mv -f /etc/apm/event.d/20ifplugd /etc/apm/event.d/20ifplugd.dpkg-old + chmod ugo-x /etc/apm/event.d/20ifplugd.dpkg-old + else + mv -f /etc/apm/event.d/20ifplugd /etc/apm/scripts.d/ifplugd + fi + for F in /etc/apm/suspend.d/20ifplugd /etc/apm/resume.d/80ifplugd /etc/apm/other.d/50ifplugd ; do + [ -e $F ] && { mv -f $F ${F}.dpkg-old ; chmod ugo-x ${F}.dpkg-old ; } + ln -nsf ../scripts.d/ifplugd $F + done + fi + + # rename old script (old typo bug), maybe user changed it: + if [ -f /etc/apm/script.d/ifplugd ] ; then + mv /etc/apm/script.d/ifplugd /etc/apm/script.d/ifplugd.dpkg-old + fi + + ;; +# install|abort-upgrade) + # Nothing to do +esac + +#DEBHELPER# diff --git a/debian/ifplugd.templates b/debian/ifplugd.templates new file mode 100644 index 0000000..65fcb57 --- /dev/null +++ b/debian/ifplugd.templates @@ -0,0 +1,54 @@ +Template: ifplugd/interfaces +Type: string +Default: +Description: static interfaces to be watched by ifplugd + Specify the interfaces to control here, separated by spaces. + Ifplugd processes will be started for each of these interfaces + when the ifplugd initscript is called with the "start" argument. + You may use the magic string "auto" to make the initscript + start or stop ifplugd processes for ALL eth and wlan interfaces + that are available according to /proc/net/dev. Note that the + list of interfaces appearing in /proc/net/dev may depend on + which kernel modules you have loaded. + . + You should not add interfaces that are hotplugged (USB or + PCMCIA) here, you will be asked for those in the next question. + +Template: ifplugd/hotplug_interfaces +Type: string +Default: +Description: hotplugged interfaces to be watched by ifplugd + Specify the hotplugged interfaces to control here, separated by spaces. + . + You may use the magic string "all" to make the hotplug script + start an ifplugd process for any hotplugged interface. + . + Hotplugged interfaces are usually interfaces on PCMCIA or WLAN + adapters. + +Template: ifplugd/args +Type: string +Default: -q -f -u0 -d10 -w -I +Description: arguments to ifplugd + You can give arguments to the ifplug daemon here. See the + man page for a description or call ifplugd -h. + +Template: ifplugd/suspend_action +Type: select +Choices: none, suspend, stop +Default: stop +Description: suspend behaviour + When you put your notebook into suspend mode, you can + choose between three actions: + . + none: no action + . + suspend: this puts ifplugd into suspend mode. In this mode, + ifplugd does not check the link status. This is necessary for + some broken network drivers. + . + stop: this stops ifplugd. If the -q option is not given, ifplugd + will stop the interface. After resume, it will be restarted. This + makes sense if you use some mechanism (eg. gueesnet or whereami) + to detect your network environment, which may have changed while + suspending. diff --git a/debian/ifstatus b/debian/ifstatus new file mode 100644 index 0000000..7c8ea9c --- /dev/null +++ b/debian/ifstatus @@ -0,0 +1,4 @@ +#!/bin/sh +echo "*** Usage of ifstatus is deprecated, use ifplugstatus instead! ***" > /dev/stderr +exec ifplugstatus "$@" + diff --git a/debian/ifupdown.action b/debian/ifupdown.action new file mode 100644 index 0000000..7613a7e --- /dev/null +++ b/debian/ifupdown.action @@ -0,0 +1,11 @@ +#!/bin/sh +set -e + +case "$2" in +up) + /sbin/ifup $1 + ;; +down) + /sbin/ifdown $1 + ;; +esac diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..e14cba4 --- /dev/null +++ b/debian/rules @@ -0,0 +1,97 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +config.status: configure + dh_testdir + # Add here commands to configure the package. + ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --sysconfdir=/etc + + +build: build-stamp + +build-stamp: config.status + dh_testdir + + $(MAKE) + + # replace arbitrary paths with paths that make sense: (sick...) + ( cd doc; \ + sed "s%file://localhost/.*doc/README%file://localhost/usr/share/doc/README%" \ + < README > README.tmp; \ + mv README.tmp README \ + ) + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + -$(MAKE) distclean +ifneq "$(wildcard /usr/share/misc/config.sub)" "" + cp -f /usr/share/misc/config.sub config.sub +endif +ifneq "$(wildcard /usr/share/misc/config.guess)" "" + cp -f /usr/share/misc/config.guess config.guess +endif + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + $(MAKE) install DESTDIR=$(CURDIR)/debian/ifplugd + # now handled by debconf: + rm -f $(CURDIR)/debian/ifplugd/etc/ifplugd/ifplugd.conf + install -m 755 debian/hotplug $(CURDIR)/debian/ifplugd/etc/hotplug.d/net/ifplugd.hotplug + mkdir -p $(CURDIR)/debian/ifplugd/etc/ifplugd/action.d/ + install -m 755 debian/ifplugd.action $(CURDIR)/debian/ifplugd/etc/ifplugd/ + install -m 755 debian/ifupdown.action $(CURDIR)/debian/ifplugd/etc/ifplugd/action.d/ifupdown + install -m 755 debian/apm/ifplugd $(CURDIR)/debian/ifplugd/etc/apm/scripts.d/ + install -m 755 debian/ifstatus $(CURDIR)/debian/ifplugd/usr/sbin/ + +binary-indep: build install + +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs doc/{NEWS,README,README.html,style.css,SUPPORTED_DRIVERS} patches + dh_installdebconf + dh_installinit + dh_installman man/*.5 man/*.8 + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/debian/shlibs.local b/debian/shlibs.local new file mode 100644 index 0000000..9dcf467 --- /dev/null +++ b/debian/shlibs.local @@ -0,0 +1 @@ +libdaemon 0 libdaemon0 (>= 0.7) |