Closed technosopher closed 11 years ago
There's also an entry in commotiond: commotiond/openwrt/etc/uci-defaults/commotiond 10:echo '192.168.1.20 thisnode' >> /etc/hosts
I added a new hotplug script to add a "thisnode" alias to the plug interface. I submitted a pull request, and am now digging into the hard-coded instances of 192.168.1.20
Submitted a new pull request to commotiond, where I removed a redundant in commotiond/openwrt/etc/uci-defaults/commotiond to set the "thisnode" alias to resolve to 192.168.1.20
TESTED!
The "thisnode" alias works on a fresh build without running quickstart via ethernet. It also works after quickstart when connected wirelessly.
The logic responsible for establishing the thisnode alias, which resides in openwrt/files/etc/hotplug.d/iface/90-thisnode, only sets up the alias if an ap interface is active. As a result, the current logic does not create the thisnode alias before quickstart has been run, which makes the node setup process considerably more complicated for a non-technical user. Additionally, there are several hard-coded references to 192.168.1.20 in various places in the build tree, which become invalid when the 192.168.1.20 alias is removed:
openwrt/files/etc/nodogsplash/nodogsplash.conf:FirewallRule allow to 192.168.1.20 openwrt/feeds/packages/net/haproxy/files/haproxy.cfg: server server02 192.168.1.20:80 source 192.168.1.1 openwrt/feeds/packages/net/haproxy/files/haproxy.cfg: server server02 192.168.1.20:123 source 192.168.1.1:25 openwrt/feeds/packages/net/ucarp/files/ucarp.conf:MYIP=192.168.1.20 openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/root-ar71xx/etc/uci-defaults/commotiond:echo '192.168.1.20 thisnode' >> /etc/hosts openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/root-ar71xx/usr/lib/lua/luci/controller/commotion-splash/splash.lua: FirewallRule allow to 192.168.1.20