Don't fiddle with any isdn interface if the isdnd variable is set to NO
in rc.conf. Actually do install the isdnd script.
This commit is contained in:
parent
15a3b3b6e1
commit
f9d12c2349
|
@ -1,10 +1,10 @@
|
|||
# $NetBSD: Makefile,v 1.14 2000/09/28 22:16:15 thorpej Exp $
|
||||
# $NetBSD: Makefile,v 1.15 2001/01/07 17:53:36 martin Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
FILES= DAEMON LOGIN NETWORK SERVERS accounting amd apmd bootparams \
|
||||
bootconf.sh ccd cleartmp cron dhclient dhcpd dhcrelay dmesg \
|
||||
fsck gated inetd ipfilter ipmon ipnat ipsec kdc ldconfig \
|
||||
fsck gated inetd ipfilter ipmon ipnat ipsec isdnd kdc ldconfig \
|
||||
lkm1 lkm2 lkm3 local lpd mopd motd mountall mountcritlocal \
|
||||
mountcritremote mountd mrouted named network newsyslog nfsd \
|
||||
nfslocking ntpd ntpdate rpcbind postfix ppp pwcheck quota \
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: isdnd,v 1.1 2001/01/07 17:04:50 martin Exp $
|
||||
# $NetBSD: isdnd,v 1.2 2001/01/07 17:53:36 martin Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: isdnd
|
||||
|
@ -18,37 +18,43 @@ pidfile="/var/run/${name}.pid"
|
|||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
|
||||
# The isdn network interfaces could not be marked UP in the ifconfig.* files,
|
||||
# since the daemon wasn't available then. If we are doing start: now it's
|
||||
# running, so figure which interfaces these applies to and UP them.
|
||||
# If doing stop: down them (for symetry, and effectively they are down).
|
||||
if checkyesno isdnd; then
|
||||
|
||||
# The isdn network interfaces could not be marked UP in the
|
||||
# ifconfig.* files, since the daemon wasn't available then.
|
||||
# If we are doing start: now it's running, so figure which
|
||||
# interfaces these applies to and UP them. If doing stop:
|
||||
# down them (for symetry, and effectively they are down).
|
||||
|
||||
case "$_arg" in
|
||||
start)
|
||||
ifflag="-d"
|
||||
ifcmd="up"
|
||||
;;
|
||||
stop)
|
||||
ifflag="-u"
|
||||
ifcmd="down"
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
case "$_arg" in
|
||||
start)
|
||||
ifflag="-d"
|
||||
ifcmd="up"
|
||||
;;
|
||||
stop)
|
||||
ifflag="-u"
|
||||
ifcmd="down"
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
tmp=`ifconfig -l $ifflag`
|
||||
for int in $tmp; do
|
||||
# Check if the interface has been configured at all
|
||||
# XXX - does this work with IPv6 ?
|
||||
if ifconfig $int | fgrep inet >/dev/null; then
|
||||
case $int in
|
||||
isp*)
|
||||
ifconfig $int $ifcmd
|
||||
;;
|
||||
ipr*)
|
||||
ifconfig $int $ifcmd
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
tmp=`ifconfig -l $ifflag`
|
||||
for int in $tmp; do
|
||||
# Check if the interface has been configured at all
|
||||
# XXX - does this work with IPv6 ?
|
||||
if ifconfig $int | fgrep inet >/dev/null; then
|
||||
case $int in
|
||||
isp*)
|
||||
ifconfig $int $ifcmd
|
||||
;;
|
||||
ipr*)
|
||||
ifconfig $int $ifcmd
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue