Leave a comment

Firstboot – Time Zone Module Release 0.3

My plan for Release 0.3 is to file a bug report to bugzilla to inform them that scdate is not performing when my script calls on it. I mention in detail in my release 0.2 what I believe the problem to be within /usr/lib/python2.7/site-packages/scdate/core/timezoneBackend.py:

#from slip.util.files import linkorcopyfile

def bool(val):
if val: return “true”
return “false”

class timezoneBackend(object):
def writeConfig (self, timezone, utc=0):
timezonefile = timezone.replace (‘ ‘, ‘_’)
fromFile = “/usr/share/zoneinfo/” + timezonefile

if utc == 0 or utc == ‘false’:
utc = “false”
else:
utc = “true”

# linkorcopyfile (fromFile, “/etc/localtime”)
os.unlink(“/etc/localtime”);
os.symlink(“/usr/share/zoneinfo/EST5EDT”, “/etc/localtime”)

#Check to see if /var/spool/postfix/etc/localtime exists
if os.access(“/var/spool/postfix/etc/localtime”, os.F_OK) == 1:
#If it does, copy the new time zone file into the chroot jail
# linkorcopyfile (fromFile, “/var/spool/postfix/etc/localtime”)
os.unlink(“/etc/localtime”);
os.symlink(“/usr/share/zoneinfo/EST5EDT”, “/etc/localtime”)

Leave a comment