Wifi_schedule.sh bug?

wifi_schedule has a nasty bug in the recheck mechanism.

What I see is that if there is a host associated then wifi_schedule
does a recheck before issuing a stop. Then it waits and does another
recheck. This recheck seems to run until it can do a stop. What was
seen was that the stop was issued finally hours later but it was
too long and killed wifi access when wifi should be enabled.


run from cron to stop at 1800 hours

  • check sees associated host
  • sleep
  • recheck
  • sleep
  • recheck
  • and so forth until wifi_schedule can issue a stop

run from cron to start at 2300 hours

  • wifi starts
  • then the recheck comes along and finally is able to issue a stop*

Perhaps the start causes associated hosts to disconnect and this
allows the recheck phase to issue a stop.