mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-14 19:29:48 +00:00
fix: removing ",gw=" from GATE variable when reading/writing from/to config. (#6177)
Previously when creating a config, GATE variable would incluse ",gw=" which was crashing the installer script when read later on. This fix: 1. writes GATE variable to config without ",gw=" 2. removes ",gw=" from GATE variable when reading existing config Co-authored-by: teohz <git@teohz.com>
This commit is contained in:
parent
7b82199a36
commit
15e3958687
2 changed files with 3 additions and 1 deletions
|
@ -272,7 +272,8 @@ config_file() {
|
|||
GATE=""
|
||||
elif [[ "$NET" =~ $ip_cidr_regex ]]; then
|
||||
echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}"
|
||||
if [ ! -z "$GATE" ]; then
|
||||
if [[ -n "$GATE" ]]; then
|
||||
[[ "$GATE" =~ ",gw=" ]] && GATE="${GATE##,gw=}"
|
||||
if [[ "$GATE" =~ $ip_regex ]]; then
|
||||
echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE${CL}"
|
||||
GATE=",gw=$GATE"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue