diff options
author | abs <abs@pkgsrc.org> | 2001-07-29 01:18:33 +0000 |
---|---|---|
committer | abs <abs@pkgsrc.org> | 2001-07-29 01:18:33 +0000 |
commit | 26c9923f99ebf55ff203e79303e31052f0c780c2 (patch) | |
tree | e99843e9c1042fdf6f0913666c5956f5cd72dc57 /net/speedtouch/files/adsl.sh | |
parent | ba4ea6048abef133735c0a13972c98babe79f15c (diff) | |
download | pkgsrc-26c9923f99ebf55ff203e79303e31052f0c780c2.tar.gz |
Import speedtouch-21062001:
Driver for the ALCATEL SpeedTouch USB ADSL modem.
It currently only supports PPPoA encapsulation.
Diffstat (limited to 'net/speedtouch/files/adsl.sh')
-rw-r--r-- | net/speedtouch/files/adsl.sh | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/net/speedtouch/files/adsl.sh b/net/speedtouch/files/adsl.sh new file mode 100644 index 00000000000..9c3ef90115f --- /dev/null +++ b/net/speedtouch/files/adsl.sh @@ -0,0 +1,45 @@ +#!/bin/sh +# +# $NetBSD: adsl.sh,v 1.1.1.1 2001/07/29 01:18:33 abs Exp $ +# +# PROVIDE: adsl +# REQUIRE: DAEMON +# +# On systems with rc.d you will need to copy this to /etc/rc.d and set +# 'adsl=YES' in /etc/rc.conf + +adsl_start() +{ + echo "Starting speedtouch adsl." + @PREFIX@/sbin/modem_run -f @PREFIX@/libdata/alcaudsl.sys -m + @PREFIX@/sbin/ppp -ddial adsl +} + +adsl_stop() +{ + PID=`ps ax | awk '/ppp -ddial adsl $/{print $1}'` + if [ -n "$PID" ]; then + echo "Stopping speedtouch adsl." + kill $PID + fi +} + +if [ ! -d /etc/rc.d ] +then + case "$1" in + start) adsl_start ;; + stop) adsl_stop ;; + rstart) adsl_stop ; adsl_start ;; + esac + exit +fi + +. /etc/rc.subr + +name="adsl" +rcvar=$name +start_cmd="adsl_start" +stop_cmd="adsl_stop" + +load_rc_config $name +run_rc_command "$1" |