several improvement and armonisation in filefct.sh, module auth and patch_snmp improved
This commit is contained in:
@@ -20,16 +20,16 @@
|
||||
# * NET{4,6}_MANUAL_FILE_$iface: filename for manual configuration of $iface
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
export VER_conf_syslog="0.0.5"
|
||||
export VER_conf_syslog="0.0.6"
|
||||
|
||||
conf_network()
|
||||
{
|
||||
local if_file="/etc/network/interfaces"
|
||||
backupdist $if_file
|
||||
backup_dist $if_file
|
||||
|
||||
# The interfaces header contain loopback interface declaration
|
||||
installfile interfaces.head $if_file
|
||||
tagfile $if_file
|
||||
install_file interfaces.head $if_file
|
||||
tag_file $if_file
|
||||
|
||||
# First configure IPv4 ifaces
|
||||
local iface=
|
||||
@@ -61,7 +61,7 @@ conf_network()
|
||||
|
||||
elif [[ $(eval echo \$NET4_MODE_$iface) == manual ]]; then
|
||||
local fname=$(eval echo \$NET4_MANUAL_FILE_$iface)
|
||||
appendfile $fname $if_file
|
||||
append_file $fname $if_file
|
||||
unset fname
|
||||
fi
|
||||
done
|
||||
@@ -94,7 +94,7 @@ conf_network()
|
||||
|
||||
elif [[ $(eval echo \$NET6_MODE_$iface) == manual ]]; then
|
||||
local fname=$(eval echo \$NET6_MANUAL_FILE_$iface)
|
||||
appendfile $fname $if_file
|
||||
append_file $fname $if_file
|
||||
unset fname
|
||||
fi
|
||||
done
|
||||
@@ -105,7 +105,7 @@ conf_network()
|
||||
|
||||
precheck_conf_network()
|
||||
{
|
||||
file_exists interfaces.head
|
||||
file_must_exists interfaces.head
|
||||
if [[ -z $IPV4_IFACES ]]; then
|
||||
prnt W "No IPv4 interfaces to configure."
|
||||
else
|
||||
@@ -124,7 +124,7 @@ precheck_conf_network()
|
||||
prnt I " * Interface $iface will use DHCP."
|
||||
;;
|
||||
"manual")
|
||||
file_exists $(eval echo \$NET4_MANUAL_FILE_$iface)
|
||||
file_must_exists $(eval echo \$NET4_MANUAL_FILE_$iface)
|
||||
prnt I " * Interface $iface will use manual IPv4 configuration in a file."
|
||||
;;
|
||||
*)
|
||||
@@ -153,7 +153,7 @@ precheck_conf_network()
|
||||
prnt I " * Interface $iface will use DHCPv6."
|
||||
;;
|
||||
"manual")
|
||||
file_exists $(eval echo \$NET6_MANUAL_FILE_$iface)
|
||||
file_must_exists $(eval echo \$NET6_MANUAL_FILE_$iface)
|
||||
prnt I " * Interface $iface will use manual IPv6 configuration in a file."
|
||||
;;
|
||||
*)
|
||||
|
||||
Reference in New Issue
Block a user