Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc Supply enough rope to let the user disable or override a...
details: https://anonhg.NetBSD.org/src/rev/1d2787c0d6c3
branches: trunk
changeset: 501850:1d2787c0d6c3
user: martin <martin%NetBSD.org@localhost>
date: Mon Jan 08 12:45:39 2001 +0000
description:
Supply enough rope to let the user disable or override all interface
up/down magic.
diffstat:
etc/defaults/rc.conf | 12 +++++++++++-
etc/rc.d/isdnd | 40 +++++++++++++++++++++++-----------------
2 files changed, 34 insertions(+), 18 deletions(-)
diffs (90 lines):
diff -r f87387b8eb06 -r 1d2787c0d6c3 etc/defaults/rc.conf
--- a/etc/defaults/rc.conf Mon Jan 08 12:41:06 2001 +0000
+++ b/etc/defaults/rc.conf Mon Jan 08 12:45:39 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: rc.conf,v 1.5 2001/01/07 17:04:49 martin Exp $
+# $NetBSD: rc.conf,v 1.6 2001/01/08 12:45:39 martin Exp $
#
# /etc/defaults/rc.conf --
# default configuration of /etc/rc.conf
@@ -164,7 +164,17 @@
kdc=NO kdc_flags=""
# ISDN daemon
+# The network interfaces used for isdn are not usefull without the isdnd
+# running. Therefor they are usually configured "down" first (i.e. in
+# /etc/ifconfig.isp0) and need to be marked "up" when the daemon is
+# running. This will happen automatically for all configured isdn interfaces
+# if this isdn_interfaces is left empty. If this behaviour is not desired
+# for certain interfaces, set isdn_interfaces to the list of interfaces,
+# where it should happen. To disable it completely, set isdn_autoupdown to
+# NO.
isdnd=NO isdnd_flags=""
+ isdn_autoupdown=YES
+ isdn_interfaces=""
# Other daemons.
#
diff -r f87387b8eb06 -r 1d2787c0d6c3 etc/rc.d/isdnd
--- a/etc/rc.d/isdnd Mon Jan 08 12:41:06 2001 +0000
+++ b/etc/rc.d/isdnd Mon Jan 08 12:45:39 2001 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: isdnd,v 1.2 2001/01/07 17:53:36 martin Exp $
+# $NetBSD: isdnd,v 1.3 2001/01/08 12:45:40 martin Exp $
#
# PROVIDE: isdnd
@@ -18,7 +18,7 @@
load_rc_config $name
run_rc_command "$1"
-if checkyesno isdnd; then
+if checkyesno isdnd && checkyesno isdn_autoupdown; then
# The isdn network interfaces could not be marked UP in the
# ifconfig.* files, since the daemon wasn't available then.
@@ -40,21 +40,27 @@
;;
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
+ if [ -z "$isdn_interfaces" ]; then
+ # the user has not specified a list of interface
+ # to track isdnd - try to figure ourselfs
+ 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*)
+ isdn_interfaces="$isdn_interfaces $int"
+ ;;
+ ipr*)
+ isdn_interfaces="$isdn_interfaces $int"
+ ;;
+ esac
+ fi
+ done
+ fi
+ for int in $isdn_interfaces; do
+ ifconfig $int $ifcmd
done
-
fi
Home |
Main Index |
Thread Index |
Old Index