> The NTP server ip is distributed via DHCP in my case. > So I want to do 'ntpd -p $NTP_SERVER'. > But that variable $NTP_SERVER is empty, and also /etc/ntp.conf does not > exist. > > Does anybody know where to find the NTP server's IP address received > with 'dhcpc -O ntpsrc' ?
If I understand the udhcpc.c code correctly, result of unknown options listed with "-O foobar" are put into the environment via the line ofs = sprintf(*curr, "opt%u=", i); So if you start your client with "udhcpc -O ntpsrv", if my guess is correct, you should get the NTP server address in the "opt0" environment variable. -- Laurent _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
