summaryrefslogtreecommitdiff
path: root/adjtime.cron
blob: a8765068d5ca5bcaf55ca59d4f7b355ba441025f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
# Update our hwclock for system drift

. /etc/rc.conf

HWCLOCK_PARAMS="--adjust"
case $HARDWARECLOCK in
    UTC) HWCLOCK_PARAMS+=" --utc";;
    localtime) HWCLOCK_PARAMS+=" --localtime";;
    *) HWCLOCK_PARAMS="";;
esac

if [[ $HWCLOCK_PARAMS ]]; then
    /sbin/hwclock $HWCLOCK_PARAMS
fi