[cloud-init/f16] Updated tzsysconfig patch

gholms gholms at fedoraproject.org
Sat Sep 24 23:09:37 UTC 2011


commit c29b44528c983396b788199bc9866270eb722341
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date:   Fri Sep 23 10:49:01 2011 -0700

    Updated tzsysconfig patch

 cloud-init-0.6.2-tzsysconfig.patch |   25 +++++--------------------
 cloud-init.spec                    |    5 ++++-
 2 files changed, 9 insertions(+), 21 deletions(-)
---
diff --git a/cloud-init-0.6.2-tzsysconfig.patch b/cloud-init-0.6.2-tzsysconfig.patch
index 9d145c4..df4681e 100644
--- a/cloud-init-0.6.2-tzsysconfig.patch
+++ b/cloud-init-0.6.2-tzsysconfig.patch
@@ -2,26 +2,11 @@ Index: cloud-init/cloudinit/CloudConfig/cc_timezone.py
 ===================================================================
 --- cloud-init.orig/cloudinit/CloudConfig/cc_timezone.py
 +++ cloud-init/cloudinit/CloudConfig/cc_timezone.py
-@@ -38,13 +38,21 @@ def handle(name,cfg,cloud,log,args):
-         log.debug("Invalid timezone %s" % tz_file)
-         raise Exception("Invalid timezone %s" % tz_file)
- 
--    try:
--        fp=open("/etc/timezone","wb")
--        fp.write("%s\n" % timezone)
--        fp.close()
--    except:
--        log.debug("failed to write to /etc/timezone")
--        raise
-+    if os.path.exists("/etc/timezone"):
-+        try:
-+            fp=open("/etc/timezone","wb")
-+            fp.write("%s\n" % timezone)
-+            fp.close()
-+        except:
-+            log.debug("failed to write to /etc/timezone")
-+            raise
-+    elif os.path.exists("/etc/sysconfig/clock"):
+@@ -45,6 +45,13 @@ def handle(name,cfg,cloud,log,args):
+     except:
+         log.debug("failed to write to /etc/timezone")
+         raise
++    if os.path.exists("/etc/sysconfig/clock"):
 +        try:
 +            with open("/etc/sysconfig/clock", "w") as fp:
 +                fp.write('ZONE="%s"\n' % timezone)
diff --git a/cloud-init.spec b/cloud-init.spec
index dd74ee5..db027a2 100644
--- a/cloud-init.spec
+++ b/cloud-init.spec
@@ -2,7 +2,7 @@
 
 Name:           cloud-init
 Version:        0.6.2
-Release:        0.1.bzr450%{?dist}
+Release:        0.2.bzr450%{?dist}
 Summary:        EC2 instance init scripts
 
 Group:          System Environment/Base
@@ -150,5 +150,8 @@ fi
 
 
 %changelog
+* Fri Sep 23 2011 Garrett Holmstrom <gholms at fedoraproject.org> - 0.6.2-0.2.bzr450
+- Updated tzsysconfig patch
+
 * Wed Sep 21 2011 Garrett Holmstrom <gholms at fedoraproject.org> - 0.6.2-0.1.bzr450
 - Initial packaging


More information about the scm-commits mailing list