1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 03:25:31 +03:00
Commit Graph

11480 Commits

Author SHA1 Message Date
Kay Sievers
67fb4482ac always unconditionally create /dev/rtc and use it internally
Partially revert 2b3c81b02f, which
tried to avoid inconsistent rules about when and how to create the
/dev/rtc symlink.

Instead of conditionally or not creating the /dev/rtc link at all,
now always create it with additional and more reliable udev rules.

First try to find the "system rtc" with the hctosys flag, if this
is not found, fall back to create the link for /dev/rtc0.

Our code now never actively searches for the "system rtc" it can
always use /dev/rtc.
2013-04-26 01:11:52 +02:00
Harald Hoyer
c3a170f3d3 systemd: record the timestamps as early as possible
The time for systemd initialization and selinux policy loading
is accounted to the initrd or the kernel, which is wrong.

Instead of:

Startup finished in 5.559s (firmware) + 36ms (loader) + 665ms (kernel) +
975ms (initrd) + 1.410s (userspace) = 8.647s

the more correct output is:

Startup finished in 5.559s (firmware) + 36ms (loader) + 665ms (kernel) +
475ms (initrd) + 1.910s (userspace) = 8.647s
2013-04-25 09:13:05 +02:00
Lennart Poettering
d6dd604b55 util: rework safe_atod() to be locale-independent
This adds some syntactic sugar with a macro RUN_WITH_LOCALE() that reset
the thread-specific locale temporarily.
2013-04-25 00:05:14 -03:00
Lennart Poettering
db5c012285 conf-parser: restrict .include usage
Disallow recursive .include, and make it unavailable in anything but
unit files.
2013-04-25 00:05:14 -03:00
Kay Sievers
60b6991a4d kdbus: update kdbus.h from upstream 2013-04-25 02:18:32 +02:00
Greg Kroah-Hartman
e7ff4e7fe9 journal: remove build warning when SELinux is disabled
A small patch to remove a build warnining when SELinux is disabled.
2013-04-25 02:13:56 +02:00
Lennart Poettering
78edb35ab4 cgroup: always validate cgroup controller names
Let's better be safe than sorry.
2013-04-24 19:02:13 -03:00
Lennart Poettering
e10375f2c0 login: allow watching virtual machines with sd_get_machine_names() 2013-04-24 19:02:13 -03:00
Lennart Poettering
a20affe2f0 login: add new call sd_get_machine_names() to get a list of current virtual machines and containers 2013-04-24 19:02:13 -03:00
Lennart Poettering
e8a7a31539 nss-myhostname: resolve 'localhost' so that /etc/hosts becomes optional
This makes sure nss-myhostname not only resolves the local host name to
127.0.0.2/::1 but also the host name 'localhost: to 127.0.0.1/::1. This
makes installation of /etc/passwd optional, as it usually only includes
a mapping for 'localhost'.

This change also resolves ::1 to the local hostname (as before), but
also lists 'localhost' as an alias. This means look-ups are now fully
reversible, even though they are 1:n mappings.

Finally, the module will no longer erroneously claim that local IP
addresses which aren't on the loopback device were.
2013-04-24 19:02:13 -03:00
Lennart Poettering
2b77f67e78 fileio: unify how we chop off whitespace from key and value in parse_env_file_internal() 2013-04-24 19:02:13 -03:00
Lennart Poettering
842865365e logind: don't busy loop if a job is still running but the delay timeout expires 2013-04-24 19:02:12 -03:00
Lennart Poettering
391a4f7242 inhbit: show comm field of inhibiting processes 2013-04-24 19:02:12 -03:00
Lennart Poettering
1f8497905d bus: add monitoring facility to busctl 2013-04-24 19:02:12 -03:00
Kay Sievers
2b3c81b02f do not create /dev/rtc symlink, let systemd search for it if needed
The export of the RTCs hctosys flag is uneccesary, the kernel takes care
of the persistemt clock management itself, without any need for:
  CONFIG_RTC_HCTOSYS=y
  CONFIG_RTC_HCTOSYS_DEVICE="rtc0"

"Chaotic hardware platforms" without native kernel persistent clock
support will find the proper RTC with the logic rtc_open() without
the need for a custom symlink.
2013-04-24 19:20:51 +02:00
Harald Hoyer
83cb95b530 add bash completion for systemd-analyze 2013-04-24 16:49:33 +02:00
Lennart Poettering
4470d84137 logind: properly enumerate user/session cgroups under their new suffixed names 2013-04-24 10:34:38 -03:00
Zbigniew Jędrzejewski-Szmek
afba41995d systemctl: show reverse dependencies or before/after ordering
Also update completion scripts a bit.
2013-04-24 00:25:04 -04:00
Zbigniew Jędrzejewski-Szmek
a6b26d9011 Small cleanup 2013-04-24 00:25:04 -04:00
Zbigniew Jędrzejewski-Szmek
90ae6c0b82 readahead: be more verbose about creation failures
systemd-readahead reports "Failed to create shared memory segment:
No such file or directory", but it's unclear how it can happen. Be
more verbose about failures.
2013-04-24 00:25:04 -04:00
Zbigniew Jędrzejewski-Szmek
ef42202ac8 Add set_consume which always takes ownership
Freeing in error path is the common pattern with set_put().
2013-04-24 00:25:04 -04:00
Zbigniew Jędrzejewski-Szmek
c79bb9e4e2 Standarize on one spelling of symlink error message
It's polite to print the name of the link that wasn't created,
and it makes little sense to print the target.
2013-04-24 00:25:04 -04:00
Zbigniew Jędrzejewski-Szmek
fff87a35d9 test: make it easier to override kernel version 2013-04-24 00:25:04 -04:00
Zbigniew Jędrzejewski-Szmek
0ee679580e systemd: fall back to mounting /sys/fs/cgroup sans xattr
xattrs on cgroup fs were added back in v3.6-rc3-3-g03b1cde. But we
support kernels >= 2.6.39, and we should also support kernels compiled
w/o xattr support, even if systemd is compiled with xattr support.
Fall back to mounting without xattr support.

Tested-by: Colin Walters <walters@verbum.org>
2013-04-24 00:25:04 -04:00
Kay Sievers
2e3ffafcab kdbus: update kdbus.h from upstream 2013-04-24 05:20:20 +02:00
Lennart Poettering
e41e194340 timer: make sure we restart timers even if units are still running or if one of their conditions fails 2013-04-23 17:42:31 -03:00
Lennart Poettering
0e99f1d6f8 update TODO 2013-04-23 16:00:32 -03:00
Lennart Poettering
3ecaa09bcc unit: rework trigger dependency logic
Instead of having explicit type-specific callbacks that inform the
triggering unit when a triggered unit changes state, make this generic
so that state changes are forwarded betwee any triggered and triggering
unit.

Also, get rid of UnitRef references from automount, timer, path units,
to the units they trigger and rely exclsuively on UNIT_TRIGGER type
dendencies.
2013-04-23 16:00:32 -03:00
Lennart Poettering
a34cb32e54 units: update user@.service to reflect new user cgroup paths 2013-04-23 16:00:32 -03:00
Lennart Poettering
7066618570 bus: add cal to determine machine id of an owner of a service 2013-04-23 16:00:32 -03:00
Umut Tezduyar
195f8e3612 man: link systemd-tmpfiles-setup-dev.service 2013-04-23 12:55:44 +02:00
Lennart Poettering
102ea8e4f2 bus: parse capability kdbus meta data of messages 2013-04-23 00:14:30 -03:00
Lennart Poettering
120f919e70 bus: parse audit metadata from kdbus messages 2013-04-22 23:38:38 -03:00
Lennart Poettering
bc7f3beb30 bus: parse owner uid from cgroup path, too 2013-04-22 23:27:38 -03:00
Lennart Poettering
ae018d9bc9 cgroup: make sure all our cgroup objects have a suffix and are properly escaped
Session objects will now get the .session suffix, user objects the .user
suffix, nspawn containers the .nspawn suffix.

This also changes the user cgroups to be named after the numeric UID
rather than the username, since this allows us the parse these paths
standalone without requiring access to the cgroup file system.

This also changes the mapping of instanced units to cgroups. Instead of
mapping foo@bar.service to the cgroup path /user/foo@.service/bar we
will now map it to /user/foo@.service/foo@bar.service, in order to
ensure that all our objects are properly suffixed in the tree.
2013-04-22 23:14:12 -03:00
Lennart Poettering
cd8f53ab16 core: there's no point to complain so loudly about non-isolatable boot targets 2013-04-22 23:14:12 -03:00
Lennart Poettering
aff38e74bd nspawn: suffix the nspawn cgroups with ".nspawn"
As discussed with Dan Berrange it's a good idea to suffix all objects in
the cgroup tree with ".something", so that when the system is
partitioned using a resource management tool we can drop objects of
different types into the same partition directory without generate
namespace conflicts.

We'l add this to the Pax Control Group document as soon as write access
to the fdo wiki is restored.
2013-04-22 23:14:12 -03:00
Lennart Poettering
dc2c75602d nspawn: always use cg_get_path() to determine fs path for a cgroup 2013-04-22 23:14:12 -03:00
Lennart Poettering
8fc66914c0 update TODO 2013-04-22 23:14:11 -03:00
Tom Gundersen
3e8037f17c units: rename systemd-static-nodes -> systemd-tmpfiles-setup-dev
This is really just a special case of systemd-tmpfiles-setup, moreover it could easily create more than static nodes.
2013-04-22 21:57:39 +02:00
Harald Hoyer
bf83067c1d shell-completion: add shell completion for "systemctl help" 2013-04-22 11:39:19 +02:00
Zbigniew Jędrzejewski-Szmek
a383724e42 systemd,nspawn: use extended attributes to store metadata
All attributes are stored as text, since root_directory is already
text, and it seems easier to have all of them in text format.

Attributes are written in the trusted. namespace, because the kernel
currently does not allow user. attributes on cgroups. This is a PITA,
and CAP_SYS_ADMIN is required to *read* the attributes. Alas.

A second pipe is opened for the child to signal the parent that the
cgroup hierarchy has been set up.
2013-04-21 21:43:43 -04:00
Lennart Poettering
9097fe299f bus: implement client logic for fd passing 2013-04-21 22:24:50 -03:00
Kay Sievers
fcdfc15924 TODO: remove dbus items which we will not touch anymore 2013-04-20 19:26:28 +02:00
Josh Triplett
601d9d6fb3 TODO: journal enhancements 2013-04-20 19:24:33 +02:00
Kay Sievers
de7a659c05 hwdb: update 2013-04-20 18:41:57 +02:00
Evangelos Foutras
9d2d0fe1e3 build-sys: prevent library underlinking
Underlinking can cause subtle bugs like the recent issue with
libnss_myhostname (which was fixed in commit 1e335af7).
2013-04-19 18:15:45 -04:00
Dave Reisner
1e335af70f nss-myhostname: ensure that glibc's assert is used 2013-04-19 16:31:52 -04:00
Lukas Nykryn
7f6437976d logind-dbus: initialize result variable 2013-04-19 10:10:41 -04:00
Lukas Nykryn
5a8e217859 crypt-setup-generator: correctly check return of strdup 2013-04-19 10:10:41 -04:00