1
0
mirror of https://github.com/fritz-smh/yi-hack synced 2025-07-27 03:37:08 +00:00
This commit is contained in:
fritz-smh 2016-03-28 21:02:42 +02:00
parent 3cd87f2f12
commit 5bcb9ad705
2 changed files with 10 additions and 3 deletions

View File

@ -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

View File

@ -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