dhcp fix alpine
This commit is contained in:
parent
b187ec383e
commit
db26e9805b
@ -100,6 +100,15 @@ setting_up_container() {
|
||||
|
||||
NS_VALUE=$(echo "$PCT_OPTIONS" | sed -n 's/.*-nameserver=\([^ ]*\).*/\1/p')
|
||||
|
||||
if [ "$UDHCPC_FIX" == "yes" ]; 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"
|
||||
elif ! grep -q '^RESOLV_CONF=' "$CONFIG_FILE"; then
|
||||
echo 'RESOLV_CONF="no"' >>"$CONFIG_FILE"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$NS_VALUE" != "" ] && [ "$NS_VALUE" != "Host" ]; then
|
||||
|
||||
CONFIG_FILE="/etc/udhcpc/udhcpc.conf"
|
||||
|
@ -573,6 +573,12 @@ advanced_settings() {
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$var_os" == "alpine" ] && [ "$NET" == "dhcp" ] && [ "$NX" != "Host" ]; then
|
||||
UDHCPC_FIX="yes"
|
||||
else
|
||||
UDHCPC_FIX="no"
|
||||
fi
|
||||
|
||||
if [ "$NET" != "dhcp" ]; then
|
||||
while true; do
|
||||
GATE1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3)
|
||||
|
Loading…
x
Reference in New Issue
Block a user