You could customize the files that sysupgrade retains, that should be the easiest way.
On Thu, Jul 14, 2016 at 4:27 AM, Ronaldo Afonso <rona...@ronaldoafonso.com.br> wrote: > Hi all, > > I'm doing a customized OpenWrt firmware and I need to know at boot time if > its the first time my OpenWrt firmware has been booted. > > More specifically, my scripts at "/etc/uci-defaults" need to know if they > are being executed by flashing over a "router original firmware" > (factory.bin) or a previews OpenWrt firmware (sysupgrade.bin). > > For example: > > I need to set the network.lan.ipaddr to the IP address "192.168.120.1" if > it is the first time I'm flashing my router, otherwise I need to preserve > the IP address the was configured before. > > Any help would be appreciated. > > Thanks in advance ... > > -- > Ronaldo Afonso > 11 9 5252 0484 > www.ronaldoafonso.com.br > > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel