Prior to the dire warning about values of network_interfaces other than

AUTO the biggest mistake users made was leaving lo0 off the list. Since
lo0 is effectively mandatory, check for it and add it to the list if
it's not there.
This commit is contained in:
Doug Barton 2009-08-23 19:52:47 +00:00
parent 01318abc57
commit 6913541fe4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=196478

View File

@ -727,6 +727,13 @@ list_net_interfaces()
;;
*)
_tmplist="${network_interfaces} ${cloned_interfaces}"
# lo0 is effectively mandatory, so help prevent foot-shooting
#
case "$_tmplist" in
lo0*|*lo0|*' lo0 '*) ;; # This is fine, do nothing
*) _tmplist="lo0 ${_tmplist}" ;;
esac
;;
esac