firmware/src/packages/fff/fff-autol3/files/usr/sbin/autoconfigl3

23 lines
476 B
Bash
Executable File

#!/bin/sh
for f in /usr/lib/autol3.d/*.sh; do
. $f
if [ $? -ne 0 ]; then
debug "Error when executing subscript $f, exiting!"
exit 1
fi
done
if [ -n "$(uci -q get fff.autol3.autoconfigl3)" ] ; then
if yes | configure-layer3 -c; then
configure-layer3 -a
else
configure-layer3 -r
fi
uci del fff.autol3.autoconfigl3
uci commit fff
# we call the script itself again here
# because if reconfigure we must say the assigner what ip
. /usr/sbin/autoconfigl3
fi