Posts Tagged fun_plug

ntpd process on D-Link DNS-313

During the configuration of a D-Link DNS-313 which is basically a NAS (Network-Attached Storage), I got a serious but easy-to-fix problem. 🙂

In order to get access to the box by command line, I installed the Fonz fun_plug. I then wanted to automatically synchronise the internal time with some NTP Pool Time Servers. But, for some reason, the version of the ntpd process provided with fun_plug is completely freezing the NAS. I wasn’t able to find the root cause of it, trust me, I tried everything I could think of!
Please also note that the same process is working perfectly fine on his brother, the D-Link DNS-323. As I said, I can’t explain why… 🙄

But there is a good news! The ntpd process is actually part of the D-Link DNS-313 firmware. And it is working fine! 😀 After double-checking, this process is however NOT part of the D-Link DNS-323 firmware. Why is that? Maybe D-Link got complaints from DNS-313 users and fixed it? Who knows…

Anyway, in order to get the ntpd process to work on the D-Link DNS-313, you need to replace the content of your ntpd startup script (/ffp/start/ntpd.sh) by the one below:

#!/ffp/bin/sh

# PROVIDE: ntpd
# REQUIRE: SERVERS
# BEFORE: LOGIN

. /ffp/etc/ffp.subr

name="ntpd"
command="/usr/sbin/ntpd"
ntpd_flags="-f /ffp/etc/ntpd.conf"
required_files="/ffp/etc/ntpd.conf"
start_cmd="ntpd_start"

ntpd_start()
{
    # remove rtc and daylight cron jobs
    crontab -l | grep -vw '/usr/sbin/daylight' | grep -vw '/usr/sbin/rtc' | crontab -

    proc_start $command
}

run_rc_command "$1"

, , , , , , , , ,

1 Comment