Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix symlink timezone info issue in some os tzdata

Signed-off-by: Gui Chen <gui.chen@intel.com>
  • Loading branch information...
commit 2fe5bd35a753f477eb7262ea0316d6b4eca735b5 1 parent 7e76adb
@chengui chengui authored
Showing with 5 additions and 6 deletions.
  1. +5 −6 mic/kickstart/__init__.py
View
11 mic/kickstart/__init__.py
@@ -201,14 +201,13 @@ def apply(self, kstimezone):
f.write("ZONE=\"" + tz + "\"\n")
f.write("UTC=" + utc + "\n")
f.close()
- tz_source = self.path("/usr/share/zoneinfo/%s" % (tz))
- tz_dest = self.path("/etc/localtime")
+ tz_source = "/usr/share/zoneinfo/%s" % (tz)
+ tz_dest = "/etc/localtime"
try:
- shutil.copyfile(tz_source, tz_dest)
+ self.call(["/bin/cp", "-f", tz_source, tz_dest])
except (IOError, OSError), (errno, msg):
- msger.warning("Error copying timezone info from "
- "'%s' to '%s': %s" \
- % (tz_source, tz_dest, msg))
+ msger.warning("Failed to copy timezone info from '%s' to '%s': %s" \
+ % (tz_source, tz_dest, msg))
class AuthConfig(KickstartConfig):
"""A class to apply a kickstart authconfig configuration to a system."""
Please sign in to comment.
Something went wrong with that request. Please try again.