--- /etc/rc.d/ntpdate.old 2010-02-07 10:37:55.000000000 +0100 +++ /etc/rc.d/ntpdate 2010-02-07 11:27:06.000000000 +0100 @@ -22,8 +22,12 @@ /^(server|peer)/ {print $2} ' < ${ntpdate_config}` fi + if [ -z "$ntpdate_hosts" -a \ + -n "`/bin/kenv dhcp.ntp-servers 2> /dev/null`" ]; then + ntpdate_hosts=`/bin/kenv dhcp.ntp-servers | sed 's/,/ /g'` + fi if [ -n "$ntpdate_hosts" -o -n "$rc_flags" ]; then - echo "Setting date via ntp." + echo "Setting date via ntp: $ntpdate_hosts" ${ntpdate_program:-ntpdate} $rc_flags $ntpdate_hosts fi }