diff options
author | Jeremy Lainé <jeremy.laine@m4x.org> | 2009-11-03 18:31:14 +0100 |
---|---|---|
committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2009-11-03 18:31:14 +0100 |
commit | 3cb452d2f533f007e8c1e7544c636968514ac106 (patch) | |
tree | 53328b3f0542213f2541b147635ce3fb09bbd7ef /recipes/ntp/ntp-4.2.4p7/ntpdate | |
parent | d450fec33abb311dac3d47a51e16098b802d08e2 (diff) |
ntp-4.2.4p7: make it possible to call hwclock from ntpdate if-up.d script
Diffstat (limited to 'recipes/ntp/ntp-4.2.4p7/ntpdate')
-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 |