From a2220489b34375d6e79678803d25aded09eecbf8 Mon Sep 17 00:00:00 2001 From: Sukru Senli Date: Tue, 19 Apr 2016 15:29:34 +0200 Subject: [PATCH] port_management: populate ports config if it has invalid config --- port-management/files/etc/init.d/port_management | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/port-management/files/etc/init.d/port_management b/port-management/files/etc/init.d/port_management index 53cadfeb0..f2a7a4fa4 100755 --- a/port-management/files/etc/init.d/port_management +++ b/port-management/files/etc/init.d/port_management @@ -12,14 +12,14 @@ check_for_config(){ if [ -s "/etc/config/ports" ] then debug_print "file exists and has content" - if uci -q show ports >/dev/null #are there any valid content then continue + if uci -q get ports.@ethport[0] >/dev/null #are there any valid content then continue then return 0 else rm -f /etc/config/ports fi fi - debug_print "file doesent exsists or is empty" + debug_print "ports config file doesn't exsist or is empty" touch /etc/config/ports local portnames="$(db get hw.board.ethernetPortNames)" local portorder="$(db get hw.board.ethernetPortOrder)"