Source-Changes-HG archive

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

[src/trunk]: src/etc/rc.d Fix the problem of just having a valid interface na...



details:   https://anonhg.NetBSD.org/src/rev/1e6e9e1c8ce4
branches:  trunk
changeset: 341057:1e6e9e1c8ce4
user:      roy <roy%NetBSD.org@localhost>
date:      Fri Oct 16 18:06:22 2015 +0000

description:
Fix the problem of just having a valid interface name in dhcpcd_flags.

diffstat:

 etc/rc.d/dhcpcd |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r 0fbc39a150c4 -r 1e6e9e1c8ce4 etc/rc.d/dhcpcd
--- a/etc/rc.d/dhcpcd   Fri Oct 16 17:38:17 2015 +0000
+++ b/etc/rc.d/dhcpcd   Fri Oct 16 18:06:22 2015 +0000
@@ -24,6 +24,10 @@
 ifname="${myflags##* }"
 myflags="${myflags%% $ifname}"
 last_flag="${myflags##* }"
+# Address the problem of having just dhcpcd_flags=wm0
+if [ "$myflags" = "$last_flag" ]; then
+       last_flag="invalidinterfacename"
+fi
 if /sbin/ifconfig "$ifname" >/dev/null 2>&1 && 
     ! /sbin/ifconfig "$last_flag" >/dev/null 2>&1
 then



Home | Main Index | Thread Index | Old Index