Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc/rc.d - replace `IFS='.'; set -- $int; echo $2` with ...



details:   https://anonhg.NetBSD.org/src/rev/ae9f4924804d
branches:  trunk
changeset: 499323:ae9f4924804d
user:      lukem <lukem%NetBSD.org@localhost>
date:      Fri Nov 17 04:19:06 2000 +0000

description:
- replace   `IFS='.'; set -- $int; echo $2`   with   ${int##*.}
- can't use $configured_interfaces in network_stop(), so use `ifconfig -lu`
  instead

diffstat:

 etc/rc.d/network |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 993e9c1d13b2 -r ae9f4924804d etc/rc.d/network
--- a/etc/rc.d/network  Fri Nov 17 03:58:01 2000 +0000
+++ b/etc/rc.d/network  Fri Nov 17 04:19:06 2000 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: network,v 1.20 2000/10/09 05:02:14 nisimura Exp $
+# $NetBSD: network,v 1.21 2000/11/17 04:19:06 lukem Exp $
 #
 
 # PROVIDE: network
@@ -94,8 +94,7 @@
                        for cloner in `ifconfig -C 2>/dev/null`; do
                                for int \
                    in `/bin/ls /etc/ifconfig.${cloner}[0-9]* 2>/dev/null`; do
-                                       int=`IFS='.'; set -- $int; echo $2`
-                                       tmp="$tmp $int"
+                                       tmp="$tmp ${int##*.}"
                                done
                        done
                else
@@ -333,7 +332,7 @@
                done < /etc/ifaliases
        fi
 
-       for int in $configured_interfaces; do
+       for int in `ifconfig -lu`; do
                eval args=\$ifaliases_$int
                if [ -n "$args" ]; then
                        set -- $args



Home | Main Index | Thread Index | Old Index