diff options
-rwxr-xr-x | recipes/ntp/ntp-4.2.4p7/ntpdate | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/recipes/ntp/ntp-4.2.4p7/ntpdate b/recipes/ntp/ntp-4.2.4p7/ntpdate index 5b139ed1ed..784b029ad5 100755 --- a/recipes/ntp/ntp-4.2.4p7/ntpdate +++ b/recipes/ntp/ntp-4.2.4p7/ntpdate @@ -35,7 +35,11 @@ if [ -x /usr/bin/lockfile-create ]; then LOCKTOUCHPID="$!" fi -/usr/bin/ntpdate -s $OPTS $NTPSERVERS 2>/dev/null || : +if /usr/bin/ntpdate -s $OPTS $NTPSERVERS 2>/dev/null; then + if [ "$UPDATE_HWCLOCK" = "yes" ]; then + hwclock --systohc || : + fi +fi if [ -x /usr/bin/lockfile-create ] ; then kill $LOCKTOUCHPID |