Set DNS Options for Alpine
This commit is contained in:
parent
019fbeed90
commit
75ee44a401
@ -200,10 +200,10 @@ customize() {
|
||||
if [ "$NS_VALUE" != "" ] && [ "$NS_VALUE" != "Host" ]; then
|
||||
|
||||
CONFIG_FILE="/etc/udhcpc/udhcpc.conf"
|
||||
if grep -q '^RESOLV_CONF=' "$CONFIG_FILE"; then
|
||||
sed -i 's/^RESOLV_CONF=.*/RESOLV_CONF=no/' "$CONFIG_FILE"
|
||||
if grep -q '^#RESOLV_CONF=' "$CONFIG_FILE"; then
|
||||
sed -i 's/^#RESOLV_CONF=.*/RESOLV_CONF="no"/' "$CONFIG_FILE"
|
||||
else
|
||||
echo 'RESOLV_CONF=no' >>"$CONFIG_FILE"
|
||||
echo 'RESOLV_CONF="no"' >>"$CONFIG_FILE"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user