diff --git a/sd/test/equip_test.sh b/sd/test/equip_test.sh index e97b680..db96c00 100644 --- a/sd/test/equip_test.sh +++ b/sd/test/equip_test.sh @@ -279,13 +279,17 @@ log "Do network configuration 2/2 (DNS)" echo "nameserver 8.8.8.8" > /etc/resolv.conf log "Done" -### configure time on a NTP server +### configure time on a NTP server log "Get time from a NTP server..." +NTP_SERVER=$(get_config NTP_SERVER) +log "But first, test the NTP server '${NTP_SERVER}':" +ping -c1 ${NTP_SERVER} >> ${LOG_FILE} log "Previous datetime is $(date)" -ntpd -q -p 0.uk.pool.ntp.org -log "Done" +ntpd -q -p ${NTP_SERVER} +log "Done" log "New datetime is $(date)" + ### set the root password root_pwd=$(get_config ROOT_PASSWORD) [ $? -eq 0 ] && echo "root:$root_pwd" | chpasswd diff --git a/sd/test/yi-hack.cfg b/sd/test/yi-hack.cfg index 65b3489..96e035c 100644 --- a/sd/test/yi-hack.cfg +++ b/sd/test/yi-hack.cfg @@ -23,6 +23,9 @@ GATEWAY=192.168.1.254 # -boff -yoff : yellow off LED_WHEN_READY=-boff -bon +### NTP server +NTP_SERVER=0.uk.pool.ntp.org + ### Debug # Debug mode, keep it to 'no' unless you known what you do # Values : yes|no