From 3cb452d2f533f007e8c1e7544c636968514ac106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jeremy=20Lain=C3=A9?= Date: Tue, 3 Nov 2009 18:31:14 +0100 Subject: ntp-4.2.4p7: make it possible to call hwclock from ntpdate if-up.d script --- recipes/ntp/ntp-4.2.4p7/ntpdate | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'recipes/ntp') 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 -- cgit v1.2.3