/etc/rc.d/netwait allows a list of IP's to be specified in $netwait_ip, and tries until $netwait_timeout (def 60) seconds pass. The current incarnation takes each IP in turn, and tries for $netwait_timeout seconds. This is rather unpleasant, since it means that firstly, it can take up to $netwait_timeout * N seconds to pass through, and secondly, if the first IP in the list isn't available, it'll take at least _timeout seconds. Any of the IP's should equally satisfy things; if the second (or later) isn't sufficient, it shouldn't be in the list, and if it is, it should be as good right off the bat as a minute (or more) later. netwait should look over the list internally each period, and go until the timeout hits. Attached patch makes a minimal change to get reasonably close; it still waits a second on each IP, so the 5th IP in the list won't get tried until 4 seconds have elapsed. If the timeout isn't divisible by the number of IP's specified, it can go overtime by the modulus (or by the number of IP's, if it's greater than the timeout). I don't consider any of those showstoppers; I have a hard time imagining cases where more than 2 or 3 IP's could be in the list. Possibly cosmetics of the messages may benefit from further adjustment; I've chosen to leave that shed unbiked.
Responsible Changed From-To: freebsd-bugs->freebsd-rc Over to maintainer(s).
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped
Keyword: patch or patch-ready – in lieu of summary line prefix: [patch] * bulk change for the keyword * summary lines may be edited manually (not in bulk). Keyword descriptions and search interface: <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>