Ntpd: unknown function `oneneedfetch' [solved?]


#1

After the machine ran overnight, /var/log/messages showed

Mar 11 03:17:27 prometheus /etc/init.d/ntpd[39548]: ntpd: unknown function `oneneedfetch'

Cause: the file /etc/periodic/daily/480.leapfile-ntpd contains a block

case "$daily_ntpd_leapfile_enable" in
    [Yy][Ee][Ss])
        if service ntpd oneneedfetch; then
            anticongestion
            service ntpd onefetch
        fi
        ;;
esac

The file /var/log/ntpd.err contained error messages like

14 Mar 19:56:53 ntpd[31182]: leapsecond file ('/var/db/ntpd.leap-seconds.list'): expired less than 442 days ago

after each reboot. Executing

service ntpd ntpd-fetch needfetch

was a remedy. The block in /etc/periodic/daily/480.leapfile-ntpd should probably be

case "$daily_ntpd_leapfile_enable" in
    [Yy][Ee][Ss])
        if service ntpd needfetch; then
            anticongestion
            service ntpd ntpd-fetch needfetch
        fi
        ;;
esac

By the way: anticongestion() is defined in /etc/defaults/periodic.conf