summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWout Mertens <wmertens@gentoo.org>2003-03-21 15:58:05 +0000
committerWout Mertens <wmertens@gentoo.org>2003-03-21 15:58:05 +0000
commit7d66b24339f50376467bdb15f1538fbc2c4d11aa (patch)
tree8092bc7cc7984bddc92abfa949df5a34e87ecb64 /sys-apps/ifplugd/files
parentnew version+old file ->mirror://gentoo (diff)
downloadgentoo-2-7d66b24339f50376467bdb15f1538fbc2c4d11aa.tar.gz
gentoo-2-7d66b24339f50376467bdb15f1538fbc2c4d11aa.tar.bz2
gentoo-2-7d66b24339f50376467bdb15f1538fbc2c4d11aa.zip
Fix of the action script + declared stable
Diffstat (limited to 'sys-apps/ifplugd/files')
-rw-r--r--sys-apps/ifplugd/files/digest-ifplugd-0.13-r11
-rw-r--r--sys-apps/ifplugd/files/ifplugd17
-rw-r--r--sys-apps/ifplugd/files/ifplugd.action41
3 files changed, 32 insertions, 27 deletions
diff --git a/sys-apps/ifplugd/files/digest-ifplugd-0.13-r1 b/sys-apps/ifplugd/files/digest-ifplugd-0.13-r1
new file mode 100644
index 000000000000..8f15d23f8242
--- /dev/null
+++ b/sys-apps/ifplugd/files/digest-ifplugd-0.13-r1
@@ -0,0 +1 @@
+MD5 20ebcc14501935c13f14f0b078ef2002 ifplugd-0.13.tar.gz 33289
diff --git a/sys-apps/ifplugd/files/ifplugd b/sys-apps/ifplugd/files/ifplugd
index 66f0249fa8f7..d206f8b1e474 100644
--- a/sys-apps/ifplugd/files/ifplugd
+++ b/sys-apps/ifplugd/files/ifplugd
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/files/ifplugd,v 1.1 2003/03/17 15:24:17 wmertens Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/files/ifplugd,v 1.2 2003/03/21 15:58:05 wmertens Exp $
#NB: Config is in /etc/conf.d/ifplugd
@@ -15,11 +15,15 @@ start() {
for IF in $INTERFACES ; do
echo -n "$IF "
$IFPLUGD -i $IF $ARGS
- if [ $? -ne 0 ]; then
- eend $? "Problem starting for $IF"
- return 1
- fi
+ # 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
}
@@ -27,8 +31,9 @@ stop() {
einfon "Stopping ifplugd: "
for IF in $INTERFACES ; do
echo -n "$IF "
- $IFPLUGD -k -i $IF || ewarn "Couldn't stop instance for $IF"
+ $IFPLUGD -k -i $IF
done
+ echo
eend 0
}
diff --git a/sys-apps/ifplugd/files/ifplugd.action b/sys-apps/ifplugd/files/ifplugd.action
index 80d961e0648a..a5b8feb896e1 100644
--- a/sys-apps/ifplugd/files/ifplugd.action
+++ b/sys-apps/ifplugd/files/ifplugd.action
@@ -1,29 +1,28 @@
#!/bin/sh
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/files/ifplugd.action,v 1.2 2003/03/21 15:58:05 wmertens Exp $
#
-# This file is part of ifplugd, and adapted for use in Gentoo Linux.
+# Gentoo-specific ifplugd.action
#
-# 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.
+# This file gets called by ifplugd when it wants to bring an interface
+# up or down.
#
-# 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
-if [ -z "$1" ] || [ -z "$2" ] ; then
- echo "Wrong arguments" > /dev/stderr
- exit 1
-fi
+case "$2" in
+ up)
+ state=start
+ ;;
+ down)
+ state=stop
+ ;;
+ *)
+ echo "$0: wrong arguments"
+ echo "Call with <interface> <up|down>"
+ exit 1
+ ;;
+esac
-[ "$2" = "up" ] && /etc/init.d/net.$1 start > /dev/null
-[ "$2" = "down" ] && /etc/init.d/net.$1 stop > /dev/null
+[ -x /etc/init.d/net.$1 ] && /etc/init.d/net.$1 --quiet $state
exit 0