[systemd-commits] TODO src/timedated.c

Lennart Poettering lennart at kemper.freedesktop.org
Mon Oct 10 19:24:00 PDT 2011


 TODO            |    6 +-----
 src/timedated.c |   20 ++++++++++++++++++--
 2 files changed, 19 insertions(+), 7 deletions(-)

New commits:
commit a724d2ed799a8985193ba70c5c3e76f621815e10
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Oct 11 04:23:35 2011 +0200

    timedate: fall back to /etc/sysconfig/clock on Fedora, for compatibility with legacy

diff --git a/TODO b/TODO
index f662104..aa51332 100644
--- a/TODO
+++ b/TODO
@@ -17,21 +17,17 @@ Bugfixes:
 
 * make polkit checks async
 
-* logind is leaking fifos?
+* fail gracefully if logind reaches it RLIMIT_NFILES for fifos
 
 Features:
 
 * ConditionCapability=
 
-* order network mounts after network-fs-ready.target or so
-
 * read fedora style timezone name config for compat
 
 * if we can not get user quota for tmpfs, mount a separate tmpfs instance
   for every user in /run/user/$USER with a configured maximum size
 
-* bind mounts should be ordered after remount-root-fs.service
-
 * default to actual 32bit PIDs, via /proc/sys/kernel/pid_max
 
 * increase RLIMIT_NOFILE for logind, logger by default
diff --git a/src/timedated.c b/src/timedated.c
index f6fe2d8..16f54b5 100644
--- a/src/timedated.c
+++ b/src/timedated.c
@@ -170,8 +170,24 @@ static int read_data(void) {
         free_data();
 
         r = read_one_line_file("/etc/timezone", &zone);
-        if (r < 0 && r != -ENOENT)
-                return r;
+        if (r < 0) {
+                if (r != -ENOENT)
+                        log_warning("Failed to read /etc/timezone: %s", strerror(-r));
+
+#ifdef TARGET_FEDORA
+                r = parse_env_file("/etc/sysconfig/clock", NEWLINE,
+                                   "ZONE", &zone,
+                                   NULL);
+
+                if (r < 0 && r != -ENOENT)
+                        log_warning("Failed to read /etc/sysconfig/clock: %s", strerror(-r));
+#endif
+        }
+
+        if (isempty(zone)) {
+                free(zone);
+                zone = NULL;
+        }
 
         verify_timezone();
 



More information about the systemd-commits mailing list