mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-05 00:54:00 -04:00
fix(core): remove duplicate -nameserver/-searchdomain prefix in pct create
The NS and SD variables already contain the -nameserver= and -searchdomain= prefixes (set in advanced_settings). PR #12521 incorrectly added a second prefix when building PCT_OPTIONS_STRING, resulting in '-nameserver -nameserver=8.8.8.8' which pct rejects. Also fixes the misleading comment ('Add storage' -> 'Add searchdomain'). Fixes #12572
This commit is contained in:
@@ -3617,16 +3617,16 @@ build_container() {
|
|||||||
$PCT_OPTIONS_STRING"
|
$PCT_OPTIONS_STRING"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add storage if specified
|
# Add searchdomain if specified
|
||||||
if [ -n "$SD" ]; then
|
if [ -n "$SD" ]; then
|
||||||
PCT_OPTIONS_STRING="$PCT_OPTIONS_STRING
|
PCT_OPTIONS_STRING="$PCT_OPTIONS_STRING
|
||||||
-searchdomain $SD"
|
$SD"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add nameserver if specified
|
# Add nameserver if specified
|
||||||
if [ -n "$NS" ]; then
|
if [ -n "$NS" ]; then
|
||||||
PCT_OPTIONS_STRING="$PCT_OPTIONS_STRING
|
PCT_OPTIONS_STRING="$PCT_OPTIONS_STRING
|
||||||
-nameserver $NS"
|
$NS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Network configuration
|
# Network configuration
|
||||||
|
|||||||
Reference in New Issue
Block a user