def setTimeZone(): # New Way; use zic sysutils.chrootRun("/usr/sbin/zic -l %s" % ctx.installData.timezone) # Old Way; copy proper timezone file as etc/localtime # os.system("rm -rf %s" % os.path.join(consts.target_dir, "etc/localtime")) # cp("usr/share/zoneinfo/%s" % ctx.installData.timezone, "etc/localtime") # Write the timezone data into /etc/timezone open(os.path.join(consts.target_dir, "etc/timezone"), "w").write("%s" % ctx.installData.timezone) return True
def generateDBusMachineID(self): "Generate a machine_id at /var/lib/dbus/machine-id" ctx.debugger.log("Generating dbus machine-id") os.remove(os.path.join(consts.target_dir,"var/lib/dbus/machine-id")) sysutils.chrootRun("/usr/bin/dbus-uuidgen --ensure") return True
def generateInitramfs(self): ctx.debugger.log("Generating Initramfs.") sysutils.chrootRun("/sbin/mkinitramfs") return True