From 0f70c955e07800db2a53b4ab357ce5fdbf4ba5cc Mon Sep 17 00:00:00 2001 From: levasseur Date: Fri, 17 Dec 2021 16:42:19 +0100 Subject: [PATCH] corrected some syntax errors --- lib/zzz_main_fct.sh | 2 +- modules/conf_network.sh | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/zzz_main_fct.sh b/lib/zzz_main_fct.sh index daac027..0d4bf71 100644 --- a/lib/zzz_main_fct.sh +++ b/lib/zzz_main_fct.sh @@ -297,7 +297,7 @@ process_commandline_and_vars() # Check for module list existance and basic syntax if [[ -n $MODULE_LIST ]]; then for $mod in $MODULE_LIST; do - if [[ $mod =~ ['\"\'\ \\-!@#$%&*=+'] ]]; then + if [[ $mod =~ ['-!@#$%\&*=+'] ]]; then prnt E "The module \"$mod\" contains a forbidden character in its name." die 5 fi diff --git a/modules/conf_network.sh b/modules/conf_network.sh index d44f239..ba47e5c 100644 --- a/modules/conf_network.sh +++ b/modules/conf_network.sh @@ -33,7 +33,7 @@ conf_network() # First configure IPv4 ifaces local iface= - for iface in $IPV4_IFACES; then + for iface in $IPV4_IFACES; do echo -e "\n# --------------------------------\n" >> $if_file if [[ $(eval echo \$NET4_MODE_$iface) == manual ]]; then prnt I "Configuring IPv4 network interface $iface in static mode..." @@ -49,7 +49,7 @@ conf_network() if [[ -n $(eval echo \$NET4_NS_SEARCH_$iface) ]]; then echo -e "\tdns_search $(eval echo \$NET4_NS_SEARCH_$iface)" >> $if_file fi - elif [[ $(eval echo \$NET4_MODE_$iface) == dhcp ]] + elif [[ $(eval echo \$NET4_MODE_$iface) == dhcp ]]; then prnt I "Configuring IPv4 network interface $iface in DHCP mode..." echo "auto $iface" >> $if_file echo "iface $iface inet dhcp" >> $if_file @@ -60,7 +60,7 @@ conf_network() fi done - for iface in $IPV6_IFACES; then + for iface in $IPV6_IFACES; do echo -e "\n# --------------------------------\n" >> $if_file if [[ $(eval echo \$NET6_MODE_$iface) == manual ]]; then prnt I "Configuring IPv6 network interface $iface in static mode..." @@ -76,11 +76,10 @@ conf_network() if [[ -n $(eval echo \$NET6_NS_SEARCH_$iface) ]]; then echo -e "\tdns_search $(eval echo \$NET6_NS_SEARCH_$iface)" >> $if_file fi - elif [[ $(eval echo \$NET6_MODE_$iface) == dhcp ]] + elif [[ $(eval echo \$NET6_MODE_$iface) == dhcp ]]; then prnt I "Configuring IPv6 network interface $iface in DHCP mode..." echo "auto $iface" >> $if_file echo "iface $iface inet6 dhcp" >> $if_file - fi elif [[ $(eval echo \$NET6_MODE_$iface) == manual ]]; then local fname=$(eval echo \$NET6_MANUAL_FILE_$iface) appendfile $fname $if_file