MFC 196478:

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.

MFC 196523:
Improve the case test to detect the presence of lo0 in the list of
network_interfaces.
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>

Approved by:	re (kib)
This commit is contained in:
Doug Barton 2009-08-29 19:45:03 +00:00
parent 59fa5c955f
commit 72d5a535fa
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/8/; revision=196645

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'|*' lo0 '*) ;; # This is fine, do nothing
*) _tmplist="lo0 ${_tmplist}" ;;
esac
;;
esac