setclock: set 2011-01-01 date when broken hardware clock is detected

This commit is contained in:
Silvan Calarco 2011-10-17 16:32:50 +02:00
parent bbc7c870b3
commit 12f2fb6d32

View File

@ -27,6 +27,13 @@ case "$1" in
hwclock --hctosys $CLOCKPARAMS hwclock --hctosys $CLOCKPARAMS
evaluate_retval evaluate_retval
echo echo
Y=`date +%Y`
[ $Y -gt 2010 ] || {
echo -n "Fixing broken hardware clock: "
date -s 2010/01/01
evaluate_retval
echo
}
;; ;;
stop) stop)
echo -n "Setting clock: " echo -n "Setting clock: "