mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
port_management: populate ports config if it has invalid config
This commit is contained in:
parent
39733b6227
commit
a2220489b3
1 changed files with 2 additions and 2 deletions
|
|
@ -12,14 +12,14 @@ check_for_config(){
|
||||||
if [ -s "/etc/config/ports" ]
|
if [ -s "/etc/config/ports" ]
|
||||||
then
|
then
|
||||||
debug_print "file exists and has content"
|
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
|
then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
rm -f /etc/config/ports
|
rm -f /etc/config/ports
|
||||||
fi
|
fi
|
||||||
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
|
touch /etc/config/ports
|
||||||
local portnames="$(db get hw.board.ethernetPortNames)"
|
local portnames="$(db get hw.board.ethernetPortNames)"
|
||||||
local portorder="$(db get hw.board.ethernetPortOrder)"
|
local portorder="$(db get hw.board.ethernetPortOrder)"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue