[systemd-devel] [PATCH] timedated: support split usr
Shawn Paul Landden
shawn at churchofgit.com
Sun Dec 21 22:55:38 PST 2014
The current Debian solution to this is really ugly, and I would rather
have them use the correct patch even if split usr is dumb.
Read: http://rusty.ozlabs.org/?p=236
("Why Everyone Must Oppose The Merging of /usr and /")
(I managed to skip the pulseaudio implamentation mess because I
had a fancy emu10k1 SoundBlaster Live! 5.1 which does its own
hardware mixing.)
---
src/timedate/timedated.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index bf567a1..985864a 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -123,9 +123,20 @@ static int context_write_data_timezone(Context *c) {
if (!p)
return log_oom();
+#ifdef HAVE_SPLIT_USR
+ r = write_one_line_file_atomic("/etc/timezone", c->zone);
+ if (r < 0)
+ return r;
+
+ /* "/usr/sha..." */
+ r = copy_file((p + 2), "/etc/localtime");
+ if (r < 0)
+ return r;
+#else
r = symlink_atomic(p, "/etc/localtime");
if (r < 0)
return r;
+#endif
return 0;
}
--
2.1.0
More information about the systemd-devel
mailing list