Ensure that lo0 gets 127.0.0.1/8 with a space separated config
This commit is contained in:
parent
16ad975b2d
commit
a6d8b76876
1
README
1
README
@ -10,6 +10,7 @@ with every other make too.
|
|||||||
You may wish to tweak the installation with the below arguments
|
You may wish to tweak the installation with the below arguments
|
||||||
LIB=lib64
|
LIB=lib64
|
||||||
DESTDIR=/tmp/openrc-image
|
DESTDIR=/tmp/openrc-image
|
||||||
|
PAM=pam
|
||||||
|
|
||||||
If any of the following files exist then we do not overwrite them
|
If any of the following files exist then we do not overwrite them
|
||||||
/etc/devd.conf
|
/etc/devd.conf
|
||||||
|
25
sh/net.sh
25
sh/net.sh
@ -400,16 +400,6 @@ _load_config() {
|
|||||||
local config="$(_get_array "config_${IFVAR}")"
|
local config="$(_get_array "config_${IFVAR}")"
|
||||||
local fallback="$(_get_array fallback_${IFVAR})"
|
local fallback="$(_get_array fallback_${IFVAR})"
|
||||||
|
|
||||||
if [ "${IFACE}" = "lo" -o "${IFACE}" = "lo0" ]; then
|
|
||||||
[ "${config}" != "null" ] && config="127.0.0.1/8
|
|
||||||
${config}"
|
|
||||||
else
|
|
||||||
if [ -z "${config}" ]; then
|
|
||||||
ewarn "No configuration specified; defaulting to DHCP"
|
|
||||||
config="dhcp"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
config_index=0
|
config_index=0
|
||||||
local IFS="$__IFS"
|
local IFS="$__IFS"
|
||||||
set -- ${config}
|
set -- ${config}
|
||||||
@ -427,9 +417,22 @@ ${config}"
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Ensure that loopback has the correct address
|
||||||
|
if [ "${IFACE}" = "lo" -o "${IFACE}" = "lo0" ]; then
|
||||||
|
if [ "$1" != "null" ]; then
|
||||||
|
config_0="127.0.0.1/8"
|
||||||
|
config_index=1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
ewarn "No configuration specified; defaulting to DHCP"
|
||||||
|
config="dhcp"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# We store our config in an array like vars
|
# We store our config in an array like vars
|
||||||
# so modules can influence it
|
# so modules can influence it
|
||||||
config_index=0
|
|
||||||
for cmd; do
|
for cmd; do
|
||||||
eval config_${config_index}="'${cmd}'"
|
eval config_${config_index}="'${cmd}'"
|
||||||
config_index=$((${config_index} + 1))
|
config_index=$((${config_index} + 1))
|
||||||
|
Loading…
Reference in New Issue
Block a user