On 03/10/2010 03:38 PM, Chris Lumens wrote:
+def upgradeSetupTime(anaconda):
+ """Load time setup for upgrade install.
+
+ This is pretty much what packages.setupTimezone() does in reverse.
+ """
+ if anaconda.dir == DISPATCH_BACK:
+ return
+ if os.environ.has_key("TZ"):
+ del os.environ["TZ"]
+ copyFromSysimage(anaconda.rootPath, '/etc/localtime')
+ copyFromSysimage(anaconda.rootPath, '/etc/adjtime')
+ if iutil.isS390():
+ return
+ args = [ "--hctosys" ]
+ try:
+ iutil.execWithRedirect("/usr/sbin/hwclock", args,stdout = "/dev/tty5",
+ stderr = "/dev/tty5")
+ except RuntimeError:
+ log.error("Failed to set the clock.")
It'd be nice if you broke this up logically with some blank lines.
- Chris
I pushed the change already, with lot more documentation comments for
the function though, should be easy to follow. Will insert more blank
lines the next time.
Ales
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list