basecamp / pow

Zero-configuration Rack server for Mac OS X
http://pow.cx/
MIT License
3.41k stars 259 forks source link

get.pow.cx self-test does not reload the network configuration #526

Open mattscilipoti opened 8 years ago

mattscilipoti commented 8 years ago

According to the comments, if the first check_domains fails, it is supposed to reload the network configuration and try again. On my system, reload_network_configuration exits immediately due to a guard clause [ "$MAC_OS_MINOR_VERSION" -lt 10 ] || return. Is that expected?

I don't know much about this area. My hypothesis is that each OS X version has a different way of reloading the network configuration. Should this code be updated to use a different method for each OS X version?

OSX 10.11.3 pow.cx 0.5.0

check_domains || {
  { reload_network_configuration && check_domains; } || {
    echo "!!! Couldn't resolve configured domains ($POW_DOMAINS)"
    print_troubleshooting_instructions
    exit 1
  }
}