Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc/rc.d Don't fiddle with any isdn interface if the isdnd v...
details: https://anonhg.NetBSD.org/src/rev/b6ac3c21646c
branches: trunk
changeset: 501796:b6ac3c21646c
user: martin <martin%NetBSD.org@localhost>
date: Sun Jan 07 17:53:36 2001 +0000
description:
Don't fiddle with any isdn interface if the isdnd variable is set to NO
in rc.conf.
Actually do install the isdnd script.
diffstat:
etc/rc.d/Makefile | 4 +-
etc/rc.d/isdnd | 72 +++++++++++++++++++++++++++++-------------------------
2 files changed, 41 insertions(+), 35 deletions(-)
diffs (103 lines):
diff -r 56243222a425 -r b6ac3c21646c etc/rc.d/Makefile
--- a/etc/rc.d/Makefile Sun Jan 07 17:04:49 2001 +0000
+++ b/etc/rc.d/Makefile Sun Jan 07 17:53:36 2001 +0000
@@ -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 \
diff -r 56243222a425 -r b6ac3c21646c etc/rc.d/isdnd
--- a/etc/rc.d/isdnd Sun Jan 07 17:04:49 2001 +0000
+++ b/etc/rc.d/isdnd Sun Jan 07 17:53:36 2001 +0000
@@ -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 @@
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
+ 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
+
Home |
Main Index |
Thread Index |
Old Index