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/1c08d9e28ede
branches:  trunk
changeset: 811199:1c08d9e28ede
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 604caa30a06a -r 1c08d9e28ede 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