tag 286948 +patch thanks Straightforward patch. Just increases the coverage of the "HWCLOCKACCESS != no" test in hwclockfirst.sh.
- Matt
diff -urN util-linux-2.12p.orig/debian/hwclockfirst.sh util-linux-2.12p/debian/hwclockfirst.sh --- util-linux-2.12p.orig/debian/hwclockfirst.sh 2005-05-28 08:47:45.000000000 +1000 +++ util-linux-2.12p/debian/hwclockfirst.sh 2005-05-28 08:52:57.000000000 +1000 @@ -60,28 +60,25 @@ if [ "$HWCLOCKACCESS" != no ] then /sbin/hwclock --hctosys $GMT $BADYEAR - fi - if [ "$VERBOSE" != no ] - then - echo "System time was `date --utc`." - echo "Setting the System Clock using the Hardware Clock as reference..." - fi + if [ "$VERBOSE" != no ] + then + echo "System time was `date --utc`." + echo "Setting the System Clock using the Hardware Clock as reference..." + fi - # Copies Hardware Clock time to System Clock using the correct - # timezone for hardware clocks in local time, and sets kernel - # timezone. DO NOT REMOVE. - if [ -z "$TZ" ] - then - /sbin/hwclock --noadjfile --hctosys $GMT $HWCLOCKPARS - else - TZ="$TZ" /sbin/hwclock --noadjfile --hctosys $GMT $HWCLOCKPARS - fi + if [ -z "$TZ" ] + then + /sbin/hwclock --noadjfile --hctosys $GMT $HWCLOCKPARS + else + TZ="$TZ" /sbin/hwclock --noadjfile --hctosys $GMT $HWCLOCKPARS + fi - if /sbin/hwclock --show $GMT $HWCLOCKPARS 2>&1 > /dev/null | grep -q '^The Hardware Clock registers contain values that are either invalid'; then - echo "Invalid system date -- setting to 1/1/2002" - /sbin/hwclock --set --date '1/1/2002 00:00:00' $GMT $HWCLOCKPARS + if /sbin/hwclock --show $GMT $HWCLOCKPARS 2>&1 > /dev/null | grep -q '^The Hardware Clock registers contain values that are either invalid'; then + echo "Invalid system date -- setting to 1/1/2002" + /sbin/hwclock --set --date '1/1/2002 00:00:00' $GMT $HWCLOCKPARS + fi fi - + if [ "$VERBOSE" != no ] then echo "System Clock set. System local time is now `date $UTC`."
signature.asc
Description: Digital signature