On Wed, 2016-09-07 at 11:07 +0100, Philip Withnall wrote:
On Sun, 2016-08-28 at 12:24 +0300, Slava Monich wrote:
> On 27/08/16 17:15, Marcel Holtmann wrote:
> > >
> > > If we are running under systemd, the ProtectSystem key in our
> > > .service
> > > file prevents us from writing to /etc/localtime. Instead, set the
> > > timezone by using org.freedesktop.timedate1 over D-Bus, if it is
> > > available. If it is not available, fall back to /etc/localtime.
> > >
> > > Signed-off-by: Philip Withnall <philip.withnall(a)collabora.co.uk>
> > > ---
> > > src/timezone.c | 213
> > > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
> > > 1 file changed, 210 insertions(+), 3 deletions(-)
> > how hard would it to build a connman_timezone_driver_register
> > infrastructure? Hard coding systemd D-Bus APIs and a fallback seems
> > like the wrong approach. I think we should have a plugin to overwrite
> > default behavior. Similar to what we do with proxies and other
> > features.
It’s more effort than I have time to put in at the moment, sorry.
Hardcoding D-Bus APIs is (I believe) an acceptable approach, since the D-
Bus API itself provides the indirection layer — the API can be
by any system process. The ‘fallback’ (/etc/localtime) should work in 90%
of cases at the moment (as it always has done).
Would it be possible to merge this? As I said, it’s an improvement in the
systemd case, and no change in the non-systemd case (certainly not a
regression). If someone wants to come along later and add a plugin API for
supporting systems other than systemd, that would be fine; but I don’t
currently have time for it. It would be nice if this patch didn’t bitrot in