mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Make fetch_mask return ${default_mask} if entry not found.
Add a couple of diagnostic messages.
This commit is contained in:
parent
7d4b046991
commit
e46899fcdb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=84625
@ -74,6 +74,7 @@ fetch_hostname() {
|
||||
esac
|
||||
fi
|
||||
done < /etc/hosts
|
||||
echo "fetch_hostname for <${key}> returns <${hostname}>"
|
||||
}
|
||||
|
||||
# sets "mask" using $1 (netmask name) as the search key in /etc/networks
|
||||
@ -89,6 +90,10 @@ fetch_mask() {
|
||||
;;
|
||||
esac
|
||||
done < /etc/networks
|
||||
if [ "${mask}" = "" ] ; then
|
||||
mask=${default_mask}
|
||||
fi
|
||||
echo "fetch_mask for <${key}> returns <${mask}>"
|
||||
}
|
||||
|
||||
|
||||
@ -104,9 +109,6 @@ set_main_interface() {
|
||||
fi
|
||||
fi
|
||||
fetch_mask ${hostname}-netmask
|
||||
if [ "${mask}" = "" ] ; then
|
||||
mask=${default_mask}
|
||||
fi
|
||||
|
||||
eval ifconfig_${main_if}=\" \${hostname} netmask \${mask}\"
|
||||
network_interfaces=`ifconfig -l`
|
||||
|
Loading…
Reference in New Issue
Block a user