volumio / volumio3-os

GNU General Public License v2.0
55 stars 38 forks source link

DHCP configuration in wireless.js #76

Open ashthespy opened 1 year ago

ashthespy commented 1 year ago

The back end uses dhcpcd.conf to set up static IP for both wired and wireless.

Whereas, wireless.js uses the following to get for IP address handling. https://github.com/volumio/volumio3-os/blob/be48af7083d42c9d6cb4a530abb4e817e992a788/volumio/bin/wireless.js#L122-L132

Some issues come to light:

  1. Reference to /data/configuration/wlanstatic that doesn't exist.
  2. The call to dhclient just runs /usr/bin/sudo /sbin/dhcpcd with out any arguments. Wouldn't it be better to explicitly call dhcpcd | -n, --rebind
  3. There is no err passed to the callback in launch
  4. The callback will be triggered immediately (sync=false), not waiting for the network connection to succeed before requesting an IP address via dhclient (dhcpcd in this case).