* config_time: use option --directisa for hwclock if running hwclock
authorMichael Prokop <mika@grml.org>
Sun, 3 Dec 2006 17:08:08 +0000 (18:08 +0100)
committerMichael Prokop <mika@grml.org>
Sun, 3 Dec 2006 17:08:08 +0000 (18:08 +0100)
    fails (work around the 'select() to /dev/rtc to wait for clock
    tick timed out' problem).

autoconfig.functions
debian/changelog

index 5307d54..5c8e087 100755 (executable)
@@ -335,8 +335,16 @@ config_time(){
   checkbootparam utc >>$DEBUG 2>&1 && UTC="-u"
   checkbootparam gmt >>$DEBUG 2>&1 && UTC="-u"
   # hwclock uses the TZ variable
-  export TZ
-  hwclock $UTC -s
+  . /etc/default/locale
+  ERROR=$(TZ="$TZ" hwclock $UTC -s 2>&1) ; RC=$?
+  if [ -n "$ERROR" ] ; then
+     eindent
+     ERROR=$(TZ="$TZ" hwclock $UTC -s --directisa 2>&1)
+     if [ -n "$ERROR" ] ; then
+        eerror "Problem running hwclock: $ERROR" ; eend 1
+     fi
+     eoutdent
+  fi
  fi
 }
 # }}}
@@ -965,7 +973,7 @@ if [ -n "$partitions" ]; then
    eindent
    if [ -n "$NOSWAP" ]; then
       if [ -z "$INSTALLED" ] ; then
-        ewarn "Ignoring swap partition ${WHITE}$p${NORMAL}. (Force usage via boot option 'swap', or execute grml-swapon)" ; eend 0
+         ewarn "Ignoring swap partition ${WHITE}$p${NORMAL}. (Force usage via boot option 'swap', or execute grml-swapon)" ; eend 0
       fi
    else
      case "$(dd if=$p bs=1 count=6 skip=4086 2>/dev/null)" in
index 3ce03ed..a7ee4b1 100644 (file)
@@ -1,3 +1,11 @@
+grml-autoconfig (0.6-7) unstable; urgency=low
+
+  * config_time: use option --directisa for hwclock if running hwclock
+    fails (work around the 'select() to /dev/rtc to wait for clock
+    tick timed out' problem).
+
+ -- Michael Prokop <mika@grml.org>  Sun,  3 Dec 2006 18:07:08 +0100
+
 grml-autoconfig (0.6-6) unstable; urgency=low
 
   * Display "not using swap partition" only in live-cd mode.