Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc/rc.d Make ifaliases_lo0 in rc.conf work just like other ...
details: https://anonhg.NetBSD.org/src/rev/29b20dbb6c71
branches: trunk
changeset: 580500:29b20dbb6c71
user: cjs <cjs%NetBSD.org@localhost>
date: Tue Apr 26 10:28:29 2005 +0000
description:
Make ifaliases_lo0 in rc.conf work just like other interfaces (instead of
being ignored). Also, when configuring aliases set as ifaliases_xxN,
print out the interface name and the alias address.
diffstat:
etc/rc.d/network | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
diffs (60 lines):
diff -r 875a740d2b92 -r 29b20dbb6c71 etc/rc.d/network
--- a/etc/rc.d/network Tue Apr 26 07:55:17 2005 +0000
+++ b/etc/rc.d/network Tue Apr 26 10:28:29 2005 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: network,v 1.47 2004/10/12 14:51:03 lukem Exp $
+# $NetBSD: network,v 1.48 2005/04/26 10:28:29 cjs Exp $
#
# PROVIDE: network
@@ -252,6 +252,8 @@
route add -inet6 default $defaultroute6
fi
+ echo -n "Adding interface aliases:"
+
# Check if each configured interface xxN has an $ifaliases_xxN variable
# associated, then configure additional IP addresses for that interface.
# The variable contains a list of "address netmask" pairs, with
@@ -261,11 +263,7 @@
# considered not recommended. Use /etc/ifconfig.xxN if possible.
#
#
- if [ -n "$configured_interfaces" ]; then
- echo "Adding interface aliases:"
- done_aliases_message=yes
- fi
- for int in $configured_interfaces; do
+ for int in lo0 $configured_interfaces; do
eval args=\$ifaliases_$int
if [ -n "$args" ]; then
set -- $args
@@ -278,6 +276,7 @@
ifconfig $int inet alias $addr \
netmask $net
fi
+ echo -n " $int:$addr"
done
fi
done
@@ -292,9 +291,6 @@
#
#
if [ -f /etc/ifaliases ]; then
- if [ "$done_aliases_message" != yes ]; then
- echo "Adding interface aliases:"
- fi
while read addr int net; do
if [ -z "$net" ]; then
# for compatibility only, obsolete
@@ -305,6 +301,8 @@
done < /etc/ifaliases
fi
+ echo
+
# IPv6 interface autoconfiguration.
#
if ifconfig lo0 inet6 >/dev/null 2>&1; then
Home |
Main Index |
Thread Index |
Old Index