New init script, new configuration options,
authorRoy Marples <uberlord@gentoo.org>
Thu, 1 Sep 2005 15:33:28 +0000 (15:33 +0000)
committerRoy Marples <uberlord@gentoo.org>
Thu, 1 Sep 2005 15:33:28 +0000 (15:33 +0000)
  better integration with baselayout-1.12.0, initng support
  fixes bugs #42804, #48482 and hopefully #75214

  Punted older versions
Package-Manager: portage-2.0.51.22-r2

15 files changed:
sys-apps/ifplugd/ChangeLog
sys-apps/ifplugd/Manifest
sys-apps/ifplugd/files/digest-ifplugd-0.13-r1 [deleted file]
sys-apps/ifplugd/files/digest-ifplugd-0.25 [deleted file]
sys-apps/ifplugd/files/digest-ifplugd-0.27 [deleted file]
sys-apps/ifplugd/files/digest-ifplugd-0.28-r1 [new file with mode: 0644]
sys-apps/ifplugd/files/ifplugd [deleted file]
sys-apps/ifplugd/files/ifplugd.action
sys-apps/ifplugd/files/ifplugd.conf [new file with mode: 0644]
sys-apps/ifplugd/files/ifplugd.init [new file with mode: 0644]
sys-apps/ifplugd/ifplugd-0.13-r1.ebuild [deleted file]
sys-apps/ifplugd/ifplugd-0.25.ebuild [deleted file]
sys-apps/ifplugd/ifplugd-0.28-r1.ebuild [moved from sys-apps/ifplugd/ifplugd-0.27.ebuild with 52% similarity]
sys-apps/ifplugd/ifplugd-0.28.ebuild
sys-apps/ifplugd/metadata.xml

index 07a7599a5caac443e3e6a129b820584daabc1492..935ef96239ee554e4b4d8b133cd645ca5721ddbb 100644 (file)
@@ -1,6 +1,18 @@
 # ChangeLog for sys-apps/ifplugd
 # Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/ChangeLog,v 1.24 2005/06/30 12:33:10 josejx Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/ChangeLog,v 1.25 2005/09/01 15:33:28 uberlord Exp $
+
+*ifplugd-0.28-r1 (01 Sep 2005)
+
+  01 Sep 2005; Roy Marples <uberlord@gentoo.org> -files/ifplugd,
+  files/ifplugd.action, +files/ifplugd.conf, +files/ifplugd.init,
+  metadata.xml, -ifplugd-0.13-r1.ebuild, -ifplugd-0.25.ebuild,
+  -ifplugd-0.27.ebuild, ifplugd-0.28.ebuild, +ifplugd-0.28-r1.ebuild:
+  New init script, new configuration options,
+  better integration with baselayout-1.12.0, initng support
+  fixes bugs #42804, #48482 and hopefully #75214
+  
+  Punted older versions
 
   30 Jun 2005; Joseph Jezak <josejx@gentoo.org> ifplugd-0.28.ebuild:
   Marked ppc stable.
index f0b4177d1bdb85f6b3ea24a71f078cb0f6a1265b..b113862993072af2ca89677c4117f0d29a33c7fe 100644 (file)
@@ -1,19 +1,16 @@
-MD5 13f4febfa2b2fed279cf3842b4da006e ChangeLog 4206
-MD5 f452b142802fc6ec5d75004af15d01e6 metadata.xml 258
-MD5 9835f287dd724e9e86f4890ad42f609b ifplugd-0.13-r1.ebuild 962
-MD5 cce9d1059b50c18761eb59cad6804f9c ifplugd-0.27.ebuild 1452
-MD5 06eb9f949f16d25868b04222405798df ifplugd-0.25.ebuild 1679
-MD5 af1be8aa6aef073fcc29b1255cc39d11 ifplugd-0.28.ebuild 1444
+MD5 a9ad3f9d8676f5a19424a5ce83270dd3 ifplugd-0.28-r1.ebuild 1301
 MD5 937bc5d89438a647988f8e77b4215f69 ifplugd-0.26-r1.ebuild 1446
-MD5 1b861d571aed96fc06f363f318fa7f98 files/digest-ifplugd-0.13-r1 63
-MD5 6ffdba40cd69c194ad974af95b512898 files/digest-ifplugd-0.27 64
+MD5 a8922039b8e1086849b9a3dc80098243 ChangeLog 4687
+MD5 50ddf6de7cdf5ef045d0189c47e4e452 metadata.xml 258
+MD5 e6ac7d869a0eb46fcd8069766bcf9370 ifplugd-0.28.ebuild 1445
+MD5 e4322329d76406800bd7810f7d1869cd files/ifplugd-0.28-gentoo.diff 1119
+MD5 0f11772693878629fb851b68920004c5 files/gentoo-ifplugd.action-v2 703
 MD5 35e218c1d5eadc7f98f2759eecb9c651 files/gentoo-ifplugd-init-v3 2685
-MD5 69b2ed677c0524a1c6dd321e8ce5a6f0 files/ifplugd 892
-MD5 fb5b08b163ee5cef2761fa8c851c33c2 files/digest-ifplugd-0.25 64
-MD5 d0a4a1e77a6aae59935cfd6d150ee3b7 files/ifplugd.action 583
+MD5 aaff46e0cdc7f78ba616e8093700cadf files/ifplugd.conf 2255
+MD5 6279601f12e6444faa6c118df03e1e3c files/ifplugd.action 999
+MD5 5b166f9bb496cef12fa2fa44a12c8c62 files/ifplugd.init 2956
 MD5 35a51405ec02cf2cf0116b7b75d98294 files/ifplugd-0.26-gentoo.diff 1547
-MD5 6f22a4f464e4c07ea9220fb81ba6848a files/digest-ifplugd-0.26-r1 64
 MD5 c110adefe6c3d268c4c1e861d120fe3a files/digest-ifplugd-0.28 64
-MD5 0f11772693878629fb851b68920004c5 files/gentoo-ifplugd.action-v2 703
-MD5 e4322329d76406800bd7810f7d1869cd files/ifplugd-0.28-gentoo.diff 1119
+MD5 c110adefe6c3d268c4c1e861d120fe3a files/digest-ifplugd-0.28-r1 64
+MD5 6f22a4f464e4c07ea9220fb81ba6848a files/digest-ifplugd-0.26-r1 64
 MD5 046da68d6aa7665b0d3a9fd9e5a67b6a files/gentoo-ifplugd-conf-v3 2248
diff --git a/sys-apps/ifplugd/files/digest-ifplugd-0.13-r1 b/sys-apps/ifplugd/files/digest-ifplugd-0.13-r1
deleted file mode 100644 (file)
index 8f15d23..0000000
+++ /dev/null
@@ -1 +0,0 @@
-MD5 20ebcc14501935c13f14f0b078ef2002 ifplugd-0.13.tar.gz 33289
diff --git a/sys-apps/ifplugd/files/digest-ifplugd-0.25 b/sys-apps/ifplugd/files/digest-ifplugd-0.25
deleted file mode 100644 (file)
index acd6d52..0000000
+++ /dev/null
@@ -1 +0,0 @@
-MD5 cbb45e24684fe5ba7a60730248cf250b ifplugd-0.25.tar.gz 138378
diff --git a/sys-apps/ifplugd/files/digest-ifplugd-0.27 b/sys-apps/ifplugd/files/digest-ifplugd-0.27
deleted file mode 100644 (file)
index f8509e7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-MD5 0b52412b7faead48ad47b9b93daeaa7b ifplugd-0.27.tar.gz 141366
diff --git a/sys-apps/ifplugd/files/digest-ifplugd-0.28-r1 b/sys-apps/ifplugd/files/digest-ifplugd-0.28-r1
new file mode 100644 (file)
index 0000000..a53e0fb
--- /dev/null
@@ -0,0 +1 @@
+MD5 df6f4bab52f46ffd6eb1f5912d4ccee3 ifplugd-0.28.tar.gz 142677
diff --git a/sys-apps/ifplugd/files/ifplugd b/sys-apps/ifplugd/files/ifplugd
deleted file mode 100644 (file)
index 699dcde..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/files/ifplugd,v 1.4 2004/07/15 00:43:53 agriffis Exp $
-
-#NB: Config is in /etc/conf.d/ifplugd
-
-IFPLUGD=/usr/sbin/ifplugd
-
-[ -z "$INTERFACES" ] && INTERFACES="eth0"
-[ "$INTERFACES" = "auto" ] && INTERFACES=`cat /proc/net/dev | awk '{ print $1 }' | grep ^eth | cut -d: -f1`
-
-start() {
-       einfon "Starting ifplugd: "
-       for IF in $INTERFACES ; do
-               echo -n "$IF "
-               $IFPLUGD -i $IF $ARGS
-       # You can't trust the exit code, so we pretend it works
-       #       status=$?
-       #       if [ $status -ne 0 ]; then
-       #               echo
-       #               eend $status "Problem starting for $IF"
-       #               return 1
-       #       fi
-       done
-       echo
-       eend 0
-}
-
-stop() {
-       einfon "Stopping ifplugd: "
-       for IF in $INTERFACES ; do
-               echo -n "$IF "
-               $IFPLUGD -k -i $IF
-       done
-       echo
-       eend 0
-}
-
-
-# vim:ts=4
index ebcd8665e8fbdc84cf824d901687ec2a2b443609..bd941d295434fbc50e0b3af6789d5629cc1f58d5 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/files/ifplugd.action,v 1.4 2004/07/15 00:43:53 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/files/ifplugd.action,v 1.5 2005/09/01 15:33:28 uberlord Exp $
 #
 # Gentoo-specific ifplugd.action
 #
@@ -9,20 +9,48 @@
 # up or down.
 #
 
+if grep -q initng /proc/1/cmdline 
+then
+    EXEC="ngc"
+    INITNG="yes"
+else
+    EXEC="/etc/init.d/net.$1"
+    INITNG="no"
+fi
+
 case "$2" in
-       up)
-               state=start
-               ;;
-       down)
-               state=stop
-               ;;
-       *)
-               echo "$0: wrong arguments"
-               echo "Call with <interface> <up|down>"
-               exit 1
-               ;;
+    up)
+       if [ "${INITNG}" = "yes" ]
+       then
+           ARGS="-u net/$1"
+       else
+           ARGS="--quiet start"
+       fi
+       ;;
+    down)
+       if [ "${INITNG}" = "yes" ]
+       then
+           ARGS="-d net/$1"
+       else
+           ARGS="--quiet stop"
+       fi
+       ;;
+    *)
+       echo "$0: wrong arguments" >&2
+       echo "Call with <interface> <up|down>" >&2
+       exit 1
+       ;;
 esac
 
-[ -x /etc/init.d/net.$1 ] && /etc/init.d/net.$1 --quiet $state
+export IN_BACKGROUND=true
+
+if [ -x "${EXEC}" ]
+then
+    ${EXEC} ${ARGS}
+    exit 0
+else
+    logger -t ifplugd.action "Error: Couldn't configure $1, no ${EXEC} !"
+    exit 1
+fi
 
-exit 0
+# vim: set ts=4
diff --git a/sys-apps/ifplugd/files/ifplugd.conf b/sys-apps/ifplugd/files/ifplugd.conf
new file mode 100644 (file)
index 0000000..f408e1b
--- /dev/null
@@ -0,0 +1,64 @@
+# -*-sh-*-
+# $Id: ifplugd.conf,v 1.1 2005/09/01 15:33:28 uberlord Exp $
+
+# 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 configuration file
+
+# Please note that this is a bourne shell fragment sourced by the
+# init script of ifplugd.
+
+# Specify the interfaces to control here, separated by spaces.
+# Ifplugd processes will be started for each of these interfaces when
+# the ifplugd init script is called with the "start" argument.
+# If INTERFACES is not set then ifplugd processes ALL 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.
+INTERFACES=""
+
+# If INTERFACES is not set above, then when WIRELESS_INTERFACES="no" then
+# all interfaces found in /proc/net/wireless are excluded from ifplugd
+WIRELESS_INTERFACES="no"
+
+# Additional parameters for ifplugd.
+# See manual page ifplugd.8 for details.
+# I recommend a delay of 0, both ways, since then, you can swap ethernet
+# cables on different networks and get a new ip address.
+# None of the programs I tested had a problem with the interface being
+# gone in the mean time.
+AUTO="no"
+BEEP="yes"
+IGNORE_FAIL="yes"
+IGNORE_FAIL_POSITIVE="no"
+IGNORE_RETVAL="yes"
+POLL_TIME="1"
+DELAY_UP="0"
+DELAY_DOWN="0"
+API_MODE="auto"
+SHUTDOWN="no"
+WAIT_ON_FORK="no"
+MONITOR="no"
+ARGS=""
+
+# Additional parameters for ifplugd for the specified interface. Note that
+# the global variable is ignored, when a variable like this is set for an
+# interface
+# MONITOR_wlan0="yes"
+# DELAY_UP_wlan0="5"
+# DELAY_DOWN_wlan0="5"
+
diff --git a/sys-apps/ifplugd/files/ifplugd.init b/sys-apps/ifplugd/files/ifplugd.init
new file mode 100644 (file)
index 0000000..77558bd
--- /dev/null
@@ -0,0 +1,118 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/files/ifplugd.init,v 1.1 2005/09/01 15:33:28 uberlord Exp $
+
+#NB: Config is in /etc/conf.d/ifplugd
+
+depend()
+{
+       use pcmcia
+}
+
+opts="stop start status"
+
+get_start_interfaces() {
+       if [[ -n ${INTERFACES} ]]; then
+               echo "${INTERFACES}"
+               return
+       fi
+
+       INTERFACES=" $(sed -ne 's/^[ \t]*\(.*\):.*/\1/p' /proc/net/dev | xargs) "
+       local exclude iface
+       if [[ -f /proc/net/wireless && ${WIRELESS_INTERFACES} == "no" ]]; then
+               exclude=$(sed -ne 's/^[ \t]*\(.*\):.*/\1/p' /proc/net/wireless | xargs)
+       fi
+       exclude=" lo ${exclude} "
+       for iface in ${exclude}; do
+               INTERFACES="${INTERFACES// ${iface} / }"
+       done
+       echo "${INTERFACES}"
+}
+
+get_running_interfaces() {
+       ( cd /var/run; ls ifplugd.*.pid | sed -n -e 's/^ifplugd.\(.*\).pid$/\1/p' )
+}
+
+# Check if an option is set for a given interface.
+# $1 is interface, $2 is option name, $3 is preset
+is_set() {
+       [[ $(get_opt "$@") == "yes" ]]
+}
+
+# Expand an option value for a given interface.
+# $1 is interface, $2 is option name, $3 is preset
+get_opt() {
+       local iface="$1" option="$2" preset="$3"
+       eval preset=\"\${${option}:=${preset}}\"
+       eval echo \"\${${option}_${iface}:=${preset}}\"
+}
+
+# Handle starting for all interfaces
+start() {
+       local iface oneworked=false
+
+       einfo "Starting ifplugd: "
+       eindent
+       
+       for iface in $(get_start_interfaces); do
+               ebegin "${iface}"
+               local args=
+               
+               is_set "${iface}" AUTO yes || args="${args}a"
+               is_set "${iface}" BEEP yes || args="${args}b"
+               is_set "${iface}" IGNORE_FAIL yes && args="${iargs}f"
+               is_set "${iface}" IGNORE_FAIL_POSITIVE no && args="${iargs}F"
+               is_set "${iface}" IGNORE_RETVAL yes && args="${iargs}I"
+               is_set "${iface}" SHUTDOWN yes || args="${iargs}q"
+               is_set "${iface}" WAIT_ON_FORK yes && args="${iargs}w"
+               is_set "${iface}" MONITOR no && args="${iargs}M"
+
+               [[ -n ${args} ]] && args="-${args}"
+
+               args="${args} -t$(get_opt ${iface} POLL_TIME 1)"
+               args="${args} -u$(get_opt ${iface} DELAY_UP 0)"
+               args="${args} -d$(get_opt ${iface} DELAY_DOWN 5)"
+               args="${args} -m$(get_opt ${iface} API_MODE auto)"
+               args="${args} $(get_opt ${iface} ARGS '')"
+
+               start-stop-daemon --start --exec /usr/sbin/ifplugd \
+                       --pidfile "/var/run/ifplugd.${iface}.pid" \
+                       -- --iface="${iface}" ${args}
+               local r="$?"
+               if is_set "${iface}" WAIT_ON_FORK yes ; then
+                       [[ ${r} -le 2 ]]
+               else
+                       [[ ${r} == "0" ]]
+               fi
+               eend $? && oneworked=true
+       done
+
+       ${oneworked}
+}
+
+stop() {
+       local iface allstopped=true
+       
+       einfo "Stopping ifplugd: "
+       eindent
+
+       for iface in $(get_running_interfaces); do
+               ebegin "${iface}"
+               start-stop-daemon --stop --exec /usr/sbin/ifplugd \
+                       --pidfile "/var/run/ifplugd.${iface}.pid"
+               eend $? || allstopped=false
+       done
+
+       ${allstopped}
+}
+
+status() {
+       local iface
+
+       for iface in $(get_running_interfaces); do
+               einfo "$(/usr/sbin/ifplugstatus ${iface})"
+       done
+}
+
+# vim:ts=4
diff --git a/sys-apps/ifplugd/ifplugd-0.13-r1.ebuild b/sys-apps/ifplugd/ifplugd-0.13-r1.ebuild
deleted file mode 100644 (file)
index e5f6615..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/ifplugd-0.13-r1.ebuild,v 1.7 2005/01/31 10:59:20 ka0ttic Exp $
-
-DESCRIPTION="Brings up/down ethernet ports automatically with cable detection"
-HOMEPAGE="http://0pointer.de/lennart/projects/ifplugd/"
-SRC_URI="http://0pointer.de/lennart/projects/ifplugd/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="x86 amd64"
-IUSE=""
-
-DEPEND=">=sys-apps/sed-4"
-
-S="${WORKDIR}/${PN}"
-
-src_unpack() {
-       unpack ${A}
-       cd ${S}
-       sed -i -e "s|\(^CFLAGS=\).*$|\1${CFLAGS}|" Makefile \
-               -e 's:/etc/ifplugd/ifplugd.action:/usr/sbin/ifplugd.action:' ifplugd.c \
-               || die "sed failed"
-}
-
-src_install() {
-       dosbin ifplugd ${FILESDIR}/ifplugd.action ifstatus
-       doman ifplugd.8 ifstatus.8
-
-       insinto /etc/conf.d ; newins ifplugd.conf ifplugd
-       exeinto /etc/init.d ; doexe ${FILESDIR}/ifplugd
-
-       dodoc README SUPPORTED_DRIVERS FAQ NEWS
-}
diff --git a/sys-apps/ifplugd/ifplugd-0.25.ebuild b/sys-apps/ifplugd/ifplugd-0.25.ebuild
deleted file mode 100644 (file)
index e09c5a7..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/ifplugd-0.25.ebuild,v 1.7 2005/03/15 14:27:26 seemant Exp $
-
-
-DESCRIPTION="Brings up/down ethernet ports automatically with cable detection"
-HOMEPAGE="http://0pointer.de/lennart/projects/ifplugd/"
-SRC_URI="http://0pointer.de/lennart/projects/ifplugd/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="x86 ~amd64 ppc"
-IUSE="doc"
-
-DEPEND=">=sys-apps/sed-4
-       dev-util/pkgconfig
-       doc? ( www-client/lynx )"
-RDEPEND=">=dev-libs/libdaemon-0.5"
-
-# Gentoo-provided scripts. Version is for the scripts, not ifplugd.
-INITSCRIPT=${FILESDIR}/gentoo-ifplugd-init-v3
-ACTIONSCRIPT=${FILESDIR}/gentoo-ifplugd.action-v2
-CONFFILE=${FILESDIR}/gentoo-ifplugd-conf-v3
-
-src_unpack() {
-       unpack ${A}
-       cd ${S}
-       # This moves the default location for the script that handles
-       # calling the distro network scripts to /usr/sbin. The reason
-       # is that the user very probably shouldn't mess with it.
-       sed -i 's:SYSCONFDIR"/ifplugd/:"/usr/sbin/:' src/ifplugd.c \
-               || die "sed failed"
-}
-
-src_compile() {
-       econf $(use_enable doc lynx) \
-               --with-initdir=/etc/init.d \
-               --disable-xmltoman \
-               --disable-subversion \
-               || die "econf failed"
-       emake || die "emake failed"
-}
-
-src_install() {
-       make DESTDIR="${D}" install || die "make install failed"
-       newsbin ${ACTIONSCRIPT} ifplugd.action
-
-       # Fix init.d configuration
-       rm -fr ${D}/etc/ifplugd ${D}/etc/init.d/ifplugd
-
-       insinto /etc/conf.d ; newins ${CONFFILE} ${PN} || die
-       exeinto /etc/init.d ; newexe ${INITSCRIPT} ${PN} || die
-
-       cd ${S}/doc
-       dodoc README SUPPORTED_DRIVERS
-       use doc && dohtml *.{html,css}
-}
similarity index 52%
rename from sys-apps/ifplugd/ifplugd-0.27.ebuild
rename to sys-apps/ifplugd/ifplugd-0.28-r1.ebuild
index 226efdcf19cf76395174ac0daf4f793ee283b4a3..4e2d43e1621f0c3ecb5caf276f2731848072f926 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/ifplugd-0.27.ebuild,v 1.2 2005/05/06 11:55:13 ka0ttic Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/ifplugd-0.28-r1.ebuild,v 1.1 2005/09/01 15:33:28 uberlord Exp $
 
 inherit eutils
 
@@ -10,22 +10,17 @@ SRC_URI="http://0pointer.de/lennart/projects/ifplugd/${P}.tar.gz"
 
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS="x86 ~amd64 ~ppc"
+KEYWORDS="~amd64 ~ppc ~x86"
 IUSE="doc"
 
 DEPEND="dev-util/pkgconfig
-       doc? ( www-client/lynx )"
-RDEPEND=">=dev-libs/libdaemon-0.5"
-
-# Gentoo-provided scripts. Version is for the scripts, not ifplugd.
-INITSCRIPT=${FILESDIR}/gentoo-ifplugd-init-v3
-ACTIONSCRIPT=${FILESDIR}/gentoo-ifplugd.action-v2
-CONFFILE=${FILESDIR}/gentoo-ifplugd-conf-v3
+       doc? ( www-client/lynx )
+       >=dev-libs/libdaemon-0.5"
 
 src_unpack() {
-       unpack ${A}
-       cd ${S}
-       epatch ${FILESDIR}/${PN}-0.26-gentoo.diff
+       unpack "${A}"
+       cd "${S}"
+       epatch "${FILESDIR}/${P}-gentoo.diff"
 }
 
 src_compile() {
@@ -39,15 +34,15 @@ src_compile() {
 
 src_install() {
        make DESTDIR="${D}" install || die "make install failed"
-       newsbin ${ACTIONSCRIPT} ifplugd.action
 
        # Fix init.d configuration
-       rm -fr ${D}/etc/ifplugd ${D}/etc/init.d/ifplugd
+       rm -rf "${D}/etc/ifplugd" "${D}/etc/init.d/${PN}"
 
-       insinto /etc/conf.d ; newins ${CONFFILE} ${PN} || die
-       exeinto /etc/init.d ; newexe ${INITSCRIPT} ${PN} || die
+       insinto /etc/conf.d ; newins "${FILESDIR}/${PN}.conf" "${PN}" || die
+       exeinto /etc/init.d ; newexe "${FILESDIR}/${PN}.init" "${PN}" || die
+       insinto /usr/sbin ; newexe "${FILESDIR}/${PN}.action" "${PN}.action"
 
-       cd ${S}/doc
+       cd "${S}/doc"
        dodoc README SUPPORTED_DRIVERS
        use doc && dohtml *.{html,css}
 }
index 22dece5d870d34cb5a4fda5a3a48abd3fc99cbd5..f33f13795ff3613833682befde24a42cc49e5956 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/ifplugd-0.28.ebuild,v 1.2 2005/06/30 12:33:10 josejx Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/ifplugd-0.28.ebuild,v 1.3 2005/09/01 15:33:28 uberlord Exp $
 
 inherit eutils
 
@@ -10,7 +10,7 @@ SRC_URI="http://0pointer.de/lennart/projects/ifplugd/${P}.tar.gz"
 
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS="~amd64 ppc x86"
+KEYWORDS="amd64 ppc x86"
 IUSE="doc"
 
 DEPEND="dev-util/pkgconfig
index e21d1ba7fea4bbc22be4addbcc6cbc496bc141a9..18949c79c26720434b33e87206f627a49c263fda 100644 (file)
@@ -3,7 +3,7 @@
 <pkgmetadata>
        <herd>base-system</herd>
        <maintainer>
-               <email>ka0ttic@gentoo.org</email>
-               <name>Aaron Walker</name>
+               <email>uberlord@gentoo.org</email>
+               <name>Roy Marples</name>
        </maintainer>
 </pkgmetadata>