summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2005-09-08 14:37:32 +0000
committerRoy Marples <uberlord@gentoo.org>2005-09-08 14:37:32 +0000
commit9b3cd9ad389359b950f9f9389e0c3e1022aa96fb (patch)
tree69270388218ef0434ebc384014921b0c5189ce01 /sys-apps/ifplugd
parentMark 2.10.3 stable on ia64 (diff)
downloadgentoo-2-9b3cd9ad389359b950f9f9389e0c3e1022aa96fb.tar.gz
gentoo-2-9b3cd9ad389359b950f9f9389e0c3e1022aa96fb.tar.bz2
gentoo-2-9b3cd9ad389359b950f9f9389e0c3e1022aa96fb.zip
New init script so we don't stop ifplugd processes launched by other
scripts and we don't start ifplugd on an interface where it is already running. Punted older ebuilds. (Portage version: 2.0.51.22-r2)
Diffstat (limited to 'sys-apps/ifplugd')
-rw-r--r--sys-apps/ifplugd/ChangeLog12
-rw-r--r--sys-apps/ifplugd/Manifest18
-rw-r--r--sys-apps/ifplugd/files/digest-ifplugd-0.26-r11
-rw-r--r--sys-apps/ifplugd/files/digest-ifplugd-0.28-r2 (renamed from sys-apps/ifplugd/files/digest-ifplugd-0.28-r1)0
-rw-r--r--sys-apps/ifplugd/files/ifplugd.init48
-rw-r--r--sys-apps/ifplugd/ifplugd-0.26-r1.ebuild53
-rw-r--r--sys-apps/ifplugd/ifplugd-0.28-r2.ebuild (renamed from sys-apps/ifplugd/ifplugd-0.28-r1.ebuild)2
7 files changed, 63 insertions, 71 deletions
diff --git a/sys-apps/ifplugd/ChangeLog b/sys-apps/ifplugd/ChangeLog
index d71ddc380b35..7d5d72e3cd32 100644
--- a/sys-apps/ifplugd/ChangeLog
+++ b/sys-apps/ifplugd/ChangeLog
@@ -1,6 +1,16 @@
# 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.26 2005/09/02 06:46:40 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/ChangeLog,v 1.27 2005/09/08 14:37:32 uberlord Exp $
+
+*ifplugd-0.28-r2 (08 Sep 2005)
+
+ 08 Sep 2005; Roy Marples <uberlord@gentoo.org> files/ifplugd.init,
+ -ifplugd-0.26-r1.ebuild, -ifplugd-0.28-r1.ebuild, +ifplugd-0.28-r2.ebuild:
+ New init script so we don't stop ifplugd processes launched by other
+ scripts and we don't start ifplugd on an interface where it is already
+ running.
+
+ Punted older ebuilds.
02 Sep 2005; Roy Marples <uberlord@gentoo.org> ifplugd-0.28-r1.ebuild:
Install ifplugd.action to /usr/sbin and not /etc/init.d
diff --git a/sys-apps/ifplugd/Manifest b/sys-apps/ifplugd/Manifest
index 37113d226b42..fc5f6501e58b 100644
--- a/sys-apps/ifplugd/Manifest
+++ b/sys-apps/ifplugd/Manifest
@@ -1,16 +1,14 @@
-MD5 eea9c2646810c03b0d44be3d40d7f841 ChangeLog 4819
-MD5 5852549e44605cf7b0a348dc3ca2b2ce ifplugd-0.28-r1.ebuild 1301
+MD5 5852549e44605cf7b0a348dc3ca2b2ce ifplugd-0.28-r2.ebuild 1301
+MD5 fc6e563f9fdd178539543f3769a4eb72 ChangeLog 5178
MD5 50ddf6de7cdf5ef045d0189c47e4e452 metadata.xml 258
MD5 e6ac7d869a0eb46fcd8069766bcf9370 ifplugd-0.28.ebuild 1445
-MD5 937bc5d89438a647988f8e77b4215f69 ifplugd-0.26-r1.ebuild 1446
-MD5 0f11772693878629fb851b68920004c5 files/gentoo-ifplugd.action-v2 703
MD5 e4322329d76406800bd7810f7d1869cd files/ifplugd-0.28-gentoo.diff 1119
-MD5 c110adefe6c3d268c4c1e861d120fe3a files/digest-ifplugd-0.28 64
-MD5 c110adefe6c3d268c4c1e861d120fe3a files/digest-ifplugd-0.28-r1 64
-MD5 35a51405ec02cf2cf0116b7b75d98294 files/ifplugd-0.26-gentoo.diff 1547
-MD5 5b166f9bb496cef12fa2fa44a12c8c62 files/ifplugd.init 2956
+MD5 0f11772693878629fb851b68920004c5 files/gentoo-ifplugd.action-v2 703
MD5 35e218c1d5eadc7f98f2759eecb9c651 files/gentoo-ifplugd-init-v3 2685
-MD5 6f22a4f464e4c07ea9220fb81ba6848a files/digest-ifplugd-0.26-r1 64
MD5 aaff46e0cdc7f78ba616e8093700cadf files/ifplugd.conf 2255
-MD5 046da68d6aa7665b0d3a9fd9e5a67b6a files/gentoo-ifplugd-conf-v3 2248
MD5 6279601f12e6444faa6c118df03e1e3c files/ifplugd.action 999
+MD5 6b55f6d5609998d40db5a00d05530841 files/ifplugd.init 3957
+MD5 35a51405ec02cf2cf0116b7b75d98294 files/ifplugd-0.26-gentoo.diff 1547
+MD5 c110adefe6c3d268c4c1e861d120fe3a files/digest-ifplugd-0.28 64
+MD5 c110adefe6c3d268c4c1e861d120fe3a files/digest-ifplugd-0.28-r2 64
+MD5 046da68d6aa7665b0d3a9fd9e5a67b6a files/gentoo-ifplugd-conf-v3 2248
diff --git a/sys-apps/ifplugd/files/digest-ifplugd-0.26-r1 b/sys-apps/ifplugd/files/digest-ifplugd-0.26-r1
deleted file mode 100644
index 3e81a2bee88c..000000000000
--- a/sys-apps/ifplugd/files/digest-ifplugd-0.26-r1
+++ /dev/null
@@ -1 +0,0 @@
-MD5 f0ceac6690b02928015aa00c0d3e663b ifplugd-0.26.tar.gz 138914
diff --git a/sys-apps/ifplugd/files/digest-ifplugd-0.28-r1 b/sys-apps/ifplugd/files/digest-ifplugd-0.28-r2
index a53e0fb022c3..a53e0fb022c3 100644
--- a/sys-apps/ifplugd/files/digest-ifplugd-0.28-r1
+++ b/sys-apps/ifplugd/files/digest-ifplugd-0.28-r2
diff --git a/sys-apps/ifplugd/files/ifplugd.init b/sys-apps/ifplugd/files/ifplugd.init
index 77558bdc162d..fff6f04f3bd2 100644
--- a/sys-apps/ifplugd/files/ifplugd.init
+++ b/sys-apps/ifplugd/files/ifplugd.init
@@ -1,7 +1,7 @@
#!/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 $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/files/ifplugd.init,v 1.2 2005/09/08 14:37:32 uberlord Exp $
#NB: Config is in /etc/conf.d/ifplugd
@@ -23,6 +23,16 @@ get_start_interfaces() {
if [[ -f /proc/net/wireless && ${WIRELESS_INTERFACES} == "no" ]]; then
exclude=$(sed -ne 's/^[ \t]*\(.*\):.*/\1/p' /proc/net/wireless | xargs)
fi
+
+ # Exclude ifplugd started by other scripts - like net.xxx
+ if [[ -d "${svcdir}/daemons" ]]; then
+ exclude="${exclude} $(
+ grep "\"/var/run/ifplugd.*.pid\"" "${svcdir}"/daemons/* 2>/dev/null \
+ | grep -v "${svcdir}/daemons/ifplugd:" \
+ | sed -n -e 's/.*ifplugd\.\(.*\)\.pid.*/\1/p'
+ )"
+ fi
+
exclude=" lo ${exclude} "
for iface in ${exclude}; do
INTERFACES="${INTERFACES// ${iface} / }"
@@ -31,7 +41,23 @@ get_start_interfaces() {
}
get_running_interfaces() {
- ( cd /var/run; ls ifplugd.*.pid | sed -n -e 's/^ifplugd.\(.*\).pid$/\1/p' )
+ local exclude="" INTERFACES=$(
+ cd /var/run
+ ls ifplugd.*.pid 2>/dev/null | sed -n -e 's/^ifplugd.\(.*\).pid$/\1/p' | xargs
+ )
+ if [[ -d "${svcdir}/daemons" ]]; then
+ local exclude=$(
+ grep "\"/var/run/ifplugd.*.pid\"" "${svcdir}"/daemons/* 2>/dev/null \
+ | grep -v "${svcdir}/daemons/ifplugd:" \
+ | sed -n -e 's/.*ifplugd\.\(.*\)\.pid.*/\1/p'
+ )
+ fi
+
+ INTERFACES=" ${INTERFACES} "
+ for iface in ${exclude}; do
+ INTERFACES=${INTERFACES// ${iface} / }
+ done
+ echo "${INTERFACES}"
}
# Check if an option is set for a given interface.
@@ -57,14 +83,24 @@ start() {
for iface in $(get_start_interfaces); do
ebegin "${iface}"
- local args=
+ local args="" pidfile="/var/run/ifplugd.${iface}.pid"
+
+ if [[ -e ${pidfile} ]] ; then
+ if is_daemon_running /usr/sbin/ifplugd "${pidfile}" ; then
+ eindent
+ einfo "ifplugd is already running on ${iface}"
+ eend 0
+ eoutdent
+ oneworked=true
+ continue
+ fi
+ fi
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"
@@ -100,7 +136,7 @@ stop() {
for iface in $(get_running_interfaces); do
ebegin "${iface}"
start-stop-daemon --stop --exec /usr/sbin/ifplugd \
- --pidfile "/var/run/ifplugd.${iface}.pid"
+ --pidfile "/var/run/ifplugd.${iface}.pid" --signal SIGQUIT
eend $? || allstopped=false
done
@@ -110,6 +146,8 @@ stop() {
status() {
local iface
+ service_started "${myservice}" || return 0
+
for iface in $(get_running_interfaces); do
einfo "$(/usr/sbin/ifplugstatus ${iface})"
done
diff --git a/sys-apps/ifplugd/ifplugd-0.26-r1.ebuild b/sys-apps/ifplugd/ifplugd-0.26-r1.ebuild
deleted file mode 100644
index 81686c3fd55b..000000000000
--- a/sys-apps/ifplugd/ifplugd-0.26-r1.ebuild
+++ /dev/null
@@ -1,53 +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.26-r1.ebuild,v 1.3 2005/05/01 17:19:20 hansmi Exp $
-
-inherit eutils
-
-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="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}
- epatch ${FILESDIR}/${P}-gentoo.diff
-}
-
-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}
-}
diff --git a/sys-apps/ifplugd/ifplugd-0.28-r1.ebuild b/sys-apps/ifplugd/ifplugd-0.28-r2.ebuild
index eefc81fcec95..ee9ac34dc186 100644
--- a/sys-apps/ifplugd/ifplugd-0.28-r1.ebuild
+++ b/sys-apps/ifplugd/ifplugd-0.28-r2.ebuild
@@ -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-r1.ebuild,v 1.2 2005/09/02 06:46:40 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/ifplugd-0.28-r2.ebuild,v 1.1 2005/09/08 14:37:32 uberlord Exp $
inherit eutils