1 2 3 4 5 6 7 8 9 10 11
#!/bin/sh set -x cur_subnet=$(uci -q get network.lan.ipaddr) if [ "$cur_subnet" != "192.168.7.1" ] then uci set network.lan.ipaddr="192.168.7.1" uci commit network ifup lan fi echo "OK"