Commit graph

317 commits

Author SHA1 Message Date
Shawn Landden 92c4ef2d35 timedated: gather timezone from /etc/localtime sym target
/etc/localtime -> /usr/share/zoneinfo/...

or

/etc/localtime -> ../usr/share/zoneinfo/...

(note, ../usr is not the same if /etc is a symlink, as this isn't
using canonicalize_file_name())

keep other method for now, consider dropping later.

Supporting relative links here are problematic as timezones in
/usr/share/zoneinfo are often themselves symlinks (and symlinks to
symlinks), so this implamentation only supports absolute symlinks
"/usr/share/zoneinfo/" and relative symlinks starting with
"../usr/share/zoneinfo/"

>From TODO (kay sievers):
* kill /etc/timezone handling entirely? What does it provide?
  - /etc/localtime carries the same information already:
      $ ls -l /etc/localtime; cat /etc/timezone
      lrwxrwxrwx 1 root root 33 Jul 27 09:55 /etc/localtime -> /usr/share/zoneinfo/Europe/Berlin
      Europe/Berlin
  - systemd enforces /usr to be available at bootup, so we can
    enforce the use of the symlink
2012-09-14 19:27:44 +02:00
Lennart Poettering 877d54e9b0 journal: generate structured journal messages for a number of events 2012-09-03 18:59:04 -07:00
Shawn Landden 0d0f0c50d3 log.h: new log_oom() -> int -ENOMEM, use it
also a number of minor fixups and bug fixes: spelling, oom errors
that didn't print errors, not properly forwarding error codes,
few more consistency issues, et cetera
2012-07-26 11:48:26 +02:00
Shawn Landden 669241a076 use "Out of memory." consistantly (or with "\n")
glibc/glib both use "out of memory" consistantly so maybe we should
consider that instead of this.

Eliminates one string out of a number of binaries. Also fixes extra newline
in udev/scsi_id
2012-07-25 11:23:57 +02:00
Lennart Poettering f6c13ce47e timedate: uniq'ify ntp units list 2012-07-03 15:37:04 +02:00
Lennart Poettering b32d167503 timedated: replace ntp-units file with an ntp-units.d drop-in dir
To be considered by timedated for NTP a package simply has to drop in
/usr/lib/systemd/ntp-units.d/foobar.list and write one or more unit
names into it. The first one listed is the one that is enabled.
2012-07-03 02:02:13 +02:00
Lennart Poettering 2b2e9df876 timedate: fix ntp-units comment 2012-07-02 11:43:02 +02:00
Lennart Poettering ac7019f33f timedated: replace systemd-timedated-ntp.target logic with simpler scheme
The previous systemd-timedated-ntp.target was suffering by the problem
that NTP implementations enabled via the machanism could not be disabled
the obvious way on the "systemctl disable" command line. Replace
systemd-timedated-ntp.target by a list of implementations we try in
turn. The list is encoded in $pkgdatadir/ntp-units.
2012-07-02 10:43:56 +02:00
Kay Sievers bbc98d3256 util: split-out hwclock.[ch] 2012-05-08 01:57:17 +02:00
Lennart Poettering e2875c4693 timedated: introduce systemd-timedated-ntp.target which is controlled by timedated's NTP setting
We shouldn't hardcode the name of the NTP implementation in the
timedated mechanism, especially since Fedora currently switched from NTP
to chrony.

This patch introduces a new target that is enabled/disabled instead of
the actual NTP implementation. The various NTP implementations should
then add .wants/ symlinks to their services and BindTo back to the
target, so that their implementations are started/stopped jointly with
the target.

https://bugzilla.redhat.com/show_bug.cgi?id=815748
2012-04-25 16:49:02 +02:00
Lennart Poettering 5430f7f2bc relicense to LGPLv2.1 (with exceptions)
We finally got the OK from all contributors with non-trivial commits to
relicense systemd from GPL2+ to LGPL2.1+.

Some udev bits continue to be GPL2+ for now, but we are looking into
relicensing them too, to allow free copy/paste of all code within
systemd.

The bits that used to be MIT continue to be MIT.

The big benefit of the relicensing is that closed source code may now
link against libsystemd-login.so and friends.
2012-04-12 00:24:39 +02:00
Lennart Poettering 2aa4c31529 timedate: don't fail if NTP is not installed
https://bugzilla.redhat.com/show_bug.cgi?id=790260
2012-02-15 00:05:31 +01:00
Lennart Poettering 89f134406a logind: introduce CanReboot/CanPowerOff bus calls 2012-02-11 00:13:10 +01:00
Kay Sievers 131a4dcfd4 login: move seat udev rules to login subdir 2012-01-22 18:32:13 +01:00
Michal Schmidt d200735e13 dbus: more efficient implementation of properties
The way the various properties[] arrays are initialized is inefficient:
 - only the .data members change at runtime, yet the whole arrays of
   properties with all the fields are constructed on the stack one by
   one by the code.
 - there's duplication, eg. the properties of "org.freedesktop.systemd1.Unit"
   are repeated in several unit types.

Fix it by moving the information about properties into static const
sections. Instead of storing the .data directly in the property, store
a constant offset from a run-time base.
The small arrays of struct BusBoundProperties bind together the constant
information with the right runtime information (the base pointer).

On my system the code shrinks by 60 KB, data increases by 10 KB.
2012-01-16 13:34:42 +01:00
Lennart Poettering 2f9dec073b build-sys: add stub makefiles to subdirs 2012-01-05 16:29:21 +01:00
Kay Sievers 4668191d02 timedated: move sources to subdirectory 2011-12-31 06:40:48 +01:00