network.subr: Cleanups and minor improvements
authorAaron LI <aly@aaronly.me>
Tue, 11 Dec 2018 06:05:20 +0000 (14:05 +0800)
committerAaron LI <aly@aaronly.me>
Wed, 12 Dec 2018 15:23:14 +0000 (23:23 +0800)
commite4b0f1d1aee8ce626258fbcb4684dc67fdf84552
tree14b223eb5dd380981552262e290e65b7db18023d
parentb0a4258dac6a92fa83c26684328e20c7dd4da4e6
network.subr: Cleanups and minor improvements

* Localize variables in all functions.
* Better name several variables (e.g., $i -> $_if).
* Simplify several test and case usages.
* Use the newly added "-n" option for ifconfig(8) in ifexists().
* Improve comments, debug messages, and styles.
* Print a message when calling rtsol(8) to auto configure an interface,
  since it may take several seconds.
etc/network.subr