some readability improvements
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
# * NTPSERVERS: list of NTP servers
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
export VER_conf_ntp="0.1.2"
|
||||
export VER_conf_ntp="0.1.3"
|
||||
export DEP_conf_ntp=""
|
||||
|
||||
conf_ntp()
|
||||
@@ -31,7 +31,7 @@ conf_ntp()
|
||||
backupdist /etc/ntp.conf
|
||||
installfile ntp.conf $dest
|
||||
local line=""
|
||||
for srv in $NTPSERVERS; do
|
||||
for srv in $NTP_SERVERS; do
|
||||
line="${line}server $srv iburst\n"
|
||||
done
|
||||
sed -i -e "s/@SERVERLIST@/$line/" $dest &&
|
||||
@@ -47,12 +47,15 @@ conf_ntp()
|
||||
# NTP
|
||||
precheck_conf_ntp()
|
||||
{
|
||||
if [[ -z $NTPSERVERS ]]; then
|
||||
if [[ -z $NTP_SERVERS ]]; then
|
||||
prnt E "No configured NTP server!"
|
||||
die 151
|
||||
else
|
||||
file_exists ntp.conf
|
||||
prnt m "The NTP servers to be used will be: $NTPSERVERS"
|
||||
prnt m "The NTP servers to be used will be:"
|
||||
for srv in $NTP_SERVERS; do
|
||||
prnt m " * $srv"
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user