summaryrefslogtreecommitdiff
path: root/net/speedtouch
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>2005-02-02 22:09:50 +0000
committertron <tron@pkgsrc.org>2005-02-02 22:09:50 +0000
commit53f463cf2a3987193b4a7f703fdec2c09c9f3dd4 (patch)
tree9d34a35e3aaf812129d9cdc0449b3559e78fb0e5 /net/speedtouch
parent6fee80635a4c8acfc98322cdf024118fab21fb2b (diff)
downloadpkgsrc-53f463cf2a3987193b4a7f703fdec2c09c9f3dd4.tar.gz
Improve "rc.d" startup script:
- Fix shell quoting bugs in adsl_stop() procedure. - Fix "awk" command used to find process id of "ppp" program. - Remove SysV semaphore which might be left behind by "modem_run". Bump package revision because of these fixes.
Diffstat (limited to 'net/speedtouch')
-rw-r--r--net/speedtouch/Makefile5
-rw-r--r--net/speedtouch/files/adsl.sh19
2 files changed, 13 insertions, 11 deletions
diff --git a/net/speedtouch/Makefile b/net/speedtouch/Makefile
index 060d5a41835..497ff1f927d 100644
--- a/net/speedtouch/Makefile
+++ b/net/speedtouch/Makefile
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.14 2004/12/28 02:47:48 reed Exp $
-#
+# $NetBSD: Makefile,v 1.15 2005/02/02 22:09:50 tron Exp $
DISTNAME= speedtouch-1.3.1
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=speedtouch/}
DISTFILES= ${DISTNAME}.tar.bz2
diff --git a/net/speedtouch/files/adsl.sh b/net/speedtouch/files/adsl.sh
index 036c2dd331a..e8e974f304b 100644
--- a/net/speedtouch/files/adsl.sh
+++ b/net/speedtouch/files/adsl.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: adsl.sh,v 1.6 2004/12/23 18:11:18 skrll Exp $
+# $NetBSD: adsl.sh,v 1.7 2005/02/02 22:09:50 tron Exp $
#
# PROVIDE: adsl
# REQUIRE: NETWORKING
@@ -38,7 +38,9 @@ adsl_start()
# Ensure we have at least tun0 - NetBSD 1.6 and later
ifconfig tun0 >/dev/null 2>&1 || ifconfig tun0 create
- if ! @PREFIX@/sbin/modem_run -f @PREFIX@/libdata/speedtouch/$firmware; then
+ ipcrm -S -559038737 >/dev/null 2>&1
+ if ! @PREFIX@/sbin/modem_run -f @PREFIX@/libdata/speedtouch/$firmware
+ then
echo "Couldn't download firmware to modem."
exit 1
fi
@@ -48,13 +50,14 @@ adsl_start()
adsl_stop()
{
- PPID="`ps ax | awk '/ppp -ddial adsl$/{print $1}'`
- MPID="`ps ax | awk '/modem_run -f /{print $1}'`
- if [ -n "$PPID $MPID" ]; then
+ PPID="`ps -ax | awk '/ppp -ddial adsl *$/{print $1}'`"
+ MPID="`ps -ax | awk '/modem_run -f /{print $1}'`"
+ if [ -n "$PPID $MPID" ]
+ then
echo "Stopping speedtouch adsl."
- for pid in $PPID $MPID; do
- kill $pid
- done
+ kill $PPID $MPID >/dev/null 2>&1
+ sleep 1
+ ipcrm -S -559038737 >/dev/null 2>&1
fi
}