From a2211e27e525b3a7f28e5ecc3e7ccb4cf27b4969 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Fri, 21 Dec 2012 11:52:01 +0100 Subject: [PATCH] - get timezone info from /etc/sysconfig/timezone - rel 3 --- systemd.spec | 4 +--- target-pld.patch | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/systemd.spec b/systemd.spec index d2daac7..5c805ee 100644 --- a/systemd.spec +++ b/systemd.spec @@ -1,6 +1,4 @@ # TODO: -# - restore sysconfig/timezone support in target-pld patch -# [now systemd expects /etc/localtime to be symlink to /usr/share/zoneinfo/... unconditionally] # - pldize vconsole setup: # http://cgit.freedesktop.org/systemd/systemd/tree/src/vconsole/vconsole-setup.c # - initrd needs love (does not build and is probably completly unusable in current form) @@ -43,7 +41,7 @@ Summary(pl.UTF-8): systemd - zarządca systemu i usług dla Linuksa Name: systemd # Verify ChangeLog and NEWS when updating (since there are incompatible/breaking changes very often) Version: 196 -Release: 2 +Release: 3 Epoch: 1 License: GPL v2+ Group: Base diff --git a/target-pld.patch b/target-pld.patch index 47a3e83..eee49c2 100644 --- a/target-pld.patch +++ b/target-pld.patch @@ -157,6 +157,24 @@ index 298cb4e..cec3974 100644 const char *verb = args[0]; unsigned f = 1, t = 1; LookupPaths paths; +--- systemd-196/src/timedate/timedated.c~ 2012-10-16 23:35:40.589269718 +0200 ++++ systemd-196/src/timedate/timedated.c 2012-12-21 11:46:13.545086335 +0100 +@@ -175,6 +175,15 @@ + } + } + ++#ifdef TARGET_PLD ++ r = parse_env_file("/etc/sysconfig/timezone", NEWLINE, ++ "TIMEZONE", &tz.zone, ++ NULL); ++ if (r < 0) { ++ if (r != -ENOENT) ++ log_warning("Failed to read /etc/sysconfig/timezone: %s", strerror(-r)); ++ } ++#endif + #ifdef HAVE_DEBIAN + r = read_one_line_file("/etc/timezone", &tz.zone); + if (r < 0) { diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c index 9196789..1d1a916 100644 --- a/src/vconsole/vconsole-setup.c -- 2.44.0