[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

knoppix-autoconfig tz cheatcode with patch



Hi,

I don't think the tz cheatcode can work with the existing knoppix-autoconfig 
as it sets the hwclock before it reads the cheatcode.  If you use lang=?? 
without a tz=??/?? it will work correctly as this sets TZ before hwclock   If 
you use both it will not be correct, it will use the value from lang not tz.

Attached patch simply raises the code which overwrites TZ with the input from 
the tz cheatcode to before the call to hwclock.

Niall Walsh
--- knoppix.autoconfig.orig	2004-11-08 22:17:20.000000000 +0000
+++ knoppix.autoconfig	2004-11-08 22:16:46.000000000 +0000
@@ -470,6 +470,10 @@
 checkbootparam gmt >/dev/null 2>&1 && UTC="-u"
 
 # hwclock uses the TZ variable
+KTZ="$(getbootparam tz 2>/dev/null)"
+[ -f "/usr/share/zoneinfo/$KTZ" ] && TZ="$KTZ"
+rm -f /etc/localtime
+cp "/usr/share/zoneinfo/$TZ" /etc/localtime
 export TZ
 hwclock $UTC -s
 
@@ -504,11 +508,6 @@
 	(echo "$1" > /etc/sysconfig/progress) &
 }
 
-KTZ="$(getbootparam tz 2>/dev/null)"
-[ -f "/usr/share/zoneinfo/$KTZ" ] && TZ="$KTZ"
-rm -f /etc/localtime
-cp "/usr/share/zoneinfo/$TZ" /etc/localtime
-
 # Delete obsolete links and files before starting autoconfig
 if ! checkbootparam "nohwsetup"; then
 rm -f /dev/cdrom* /dev/cdwriter* /dev/mouse* /dev/modem* /dev/scanner* \

Reply to: