[Commotion-admin] [commotion-openwrt] Issue73 (#74)

gradyoti notifications at github.com
Wed Dec 11 19:47:36 UTC 2013


Addresses commotion-openwrt issue73: https://github.com/opentechinstitute/commotion-openwrt/issues/73

TO TEST:

1a) Before running quickstart, type 'thisnode' into your browser. You should get the admin page.
Do not run quickstart yet.

1b) Telnet into the node. 
$ logread | grep commotion.hotplug.thisnode

You should see:
"Adding thisnode to /etc/hosts"
"Checking for UCI entry for thisnode alias"
"No entry found. Creating UCI entry for 'thisnode' alias"
"Setting 'thisnode' ip address to 169.254.xx.xx"

1c) Go back to your browser. Run quickstart.

1d) Log into the node again.
$ logread | grep commotion.hotplug.thisnode

You should see:
"Found thisnode in /etc/hosts"
"Checking for UCI entry for thisnode alias"
"thisnode alias exists with ip address 169.254.xx.xx"

Since we're here, let's just do a sanity check:

$ less /etc/hosts

You should see an entry for 'thisnode'

$ less /etc/config/network

You should see a config section for 'alias'
The type is plug, ip addr is 169.254.xx.xx, proto is static, netmask is 255.255.0.0

2) ........

3) PROFIT!

You can merge this Pull Request by running:

  git pull https://github.com/opentechinstitute/commotion-openwrt issue73

Or you can view, comment on it, or merge it online at:

  https://github.com/opentechinstitute/commotion-openwrt/pull/74

-- Commit Summary --

  * added uci commit call
  * added check for thisnode alias, to limit writes to disk
  * modularized thisnode check
  * fixed logic for alias check and added logging
  * fixed if statement
  * MOAR logging
  * removed unnecessary editing of hosts file and added new check

-- File Changes --

    M default-files/etc/hotplug.d/iface/90-thisnode (29)

-- Patch Links --

https://github.com/opentechinstitute/commotion-openwrt/pull/74.patch
https://github.com/opentechinstitute/commotion-openwrt/pull/74.diff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chambana.net/pipermail/commotion-admin/attachments/20131211/b2942b15/attachment.html>


More information about the Commotion-admin mailing list