Update alpine-install.func

This commit is contained in:
CanbiZ 2025-05-07 08:03:21 +02:00
parent db26e9805b
commit c0c2f6544e

View File

@ -98,8 +98,6 @@ msg_error() {
setting_up_container() {
msg_info "Setting up Container OS"
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
@ -109,16 +107,6 @@ setting_up_container() {
fi
fi
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"
else
echo 'RESOLV_CONF="no"' >>"$CONFIG_FILE"
fi
fi
while [ $i -gt 0 ]; do
if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" != "" ]; then
break