/usr/sbin/ntpdate-debian is in ntpdate 1:4.2.6.p5+dfsg-3ubuntu2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #!/bin/sh
set -e
if [ -r /etc/default/ntpdate ]; then
. /etc/default/ntpdate
fi
if [ "$NTPDATE_USE_NTP_CONF" = yes ]; then
for f in /var/lib/ntp/ntp.conf.dhcp /etc/ntp.conf /etc/openntpd/ntpd.conf; do
if [ -r "$f" ] && [ -s "$f" ]; then
file=$f
break
fi
done
if [ -n "$file" ]; then
NTPSERVERS=$(sed -rne 's/^(servers?|peer)[[:space:]]+(-[46][[:space:]]+)?([-_.:[:alnum:]]+).*$/\3/p' "$file" | grep -v '^127\.127\.') || [ $? -le 1 ]
fi
elif [ -r /var/lib/ntpdate/default.dhcp ]; then
. /var/lib/ntpdate/default.dhcp
fi
exec /usr/sbin/ntpdate $NTPOPTIONS "$@" $NTPSERVERS
|