Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc/rc.d Shell programming police for sophistication; take #...
details: https://anonhg.NetBSD.org/src/rev/d74751066f8f
branches: trunk
changeset: 499499:d74751066f8f
user: nisimura <nisimura%NetBSD.org@localhost>
date: Tue Nov 21 09:38:06 2000 +0000
description:
Shell programming police for sophistication; take #2. Handle the
case when the filename expansion results in no match more gracefully.
Far less costy than invoking a new process.
diffstat:
etc/rc.d/network | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (22 lines):
diff -r 40b6135d7997 -r d74751066f8f etc/rc.d/network
--- a/etc/rc.d/network Tue Nov 21 08:39:50 2000 +0000
+++ b/etc/rc.d/network Tue Nov 21 09:38:06 2000 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: network,v 1.22 2000/11/21 08:39:50 nisimura Exp $
+# $NetBSD: network,v 1.23 2000/11/21 09:38:06 nisimura Exp $
#
# PROVIDE: network
@@ -92,8 +92,8 @@
if checkyesno auto_ifconfig; then
tmp=`ifconfig -l`
for cloner in `ifconfig -C 2>/dev/null`; do
- for int \
- in `/bin/ls /etc/ifconfig.${cloner}[0-9]* 2>/dev/null`; do
+ for int in /etc/ifconfig.${cloner}[0-9]*
+ [ ! -f $int ] && break
tmp="$tmp ${int##*.}"
done
done
Home |
Main Index |
Thread Index |
Old Index