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

11629 Commits

Author SHA1 Message Date
Lennart Poettering
97e67f1e52 machined: relax access to GetMachine() 2013-07-02 15:03:09 +02:00
Lennart Poettering
6a4e0b1347 nspawn: use the corect method signature for CreateMachine() 2013-07-02 15:02:54 +02:00
Lennart Poettering
51da82a781 machined: fix bus path unescaping 2013-07-02 03:58:28 +02:00
Lennart Poettering
1ee306e124 machined: split out machine registration stuff from logind
Embedded folks don't need the machine registration stuff, hence it's
nice to make this optional. Also, I'd expect that machinectl will grow
additional commands quickly, for example to join existing containers and
suchlike, hence it's better keeping that separate from loginctl.
2013-07-02 03:47:23 +02:00
Lennart Poettering
374ec6abf3 libsystemd-logind: fix detection of session/user/machine of a PID 2013-07-02 02:34:15 +02:00
Kay Sievers
efffb13e00 keymap: Asus -- do not overwrite explicitely kernel driver defined keys
If key mappings are defined in the kernel driver, userspace must
not overwrite them. If something is wrong with the kernel-provided
values, the kernel driver shold be fixed instead.

Some of the matches are not the input device name but the kernel
driver name, which will not match anything.
2013-07-02 02:16:36 +02:00
Lennart Poettering
fb6becb443 logind: port over to use scopes+slices for all cgroup stuff
In order to prepare things for the single-writer cgroup scheme, let's
make logind use systemd's own primitives for cgroup management.

Every login user now gets his own private slice unit, in which his sessions
live in a scope unit each. Also, add user@$UID.service to the same
slice, and implicitly start it on first login.
2013-07-02 01:48:55 +02:00
Lennart Poettering
358712f3de scope: fix state string table 2013-07-02 01:48:55 +02:00
Lennart Poettering
8bcca7e201 scope: implement reset-failed command 2013-07-02 01:48:55 +02:00
Lennart Poettering
ede3a79675 core: split out unit bus path unescaping into unit_name_from_dbus_path() 2013-07-02 01:48:55 +02:00
Lennart Poettering
cc23f9f174 scope: make TimeoutStopUSec= settable for transient units 2013-07-02 01:48:55 +02:00
Kay Sievers
eb2059d897 keymap: remove non-existing driver string matches
There are no such strings for input devices in the kernel.
2013-07-01 23:55:34 +02:00
Kay Sievers
67410e9f73 hwdb: add --device=<device-id> and --filter=<key name glob> 2013-07-01 22:34:43 +02:00
Kay Sievers
d9b17672eb hwdb: import data 2013-07-01 19:41:19 +02:00
Kay Sievers
3cf7b686e6 hwdb: remove support for (not fully implemented) conditional properties 2013-07-01 19:39:50 +02:00
Lennart Poettering
c221420be8 core: add support to run transient units in arbitrary slices 2013-07-01 03:02:42 +02:00
Lennart Poettering
d28e9236e7 core: parse Slice= from the unit type specific unit file section
Since not all unit types know Slice= it belongs in the unit type
specific unit file section.
2013-07-01 02:52:17 +02:00
Lennart Poettering
adb3a45d9a scope: properly implement passive validity checking of PIDs field when creating transient scopes 2013-07-01 02:47:11 +02:00
Lennart Poettering
d7550a6752 core: move ControlGroup and Slice properties out of the dbus "Unit" interface
Slice/ControlGroup only really makes sense for unit types which actually
have cgroups attached to them, hence move them out of the generic Unit
interface and into the specific unit type interfaces.

These fields will continue to be part of Unit though, simply because
things are a log easier that way. However, regardless how this looks
internally we should keep things clean and independent of the specific
implementation of the inside.
2013-07-01 02:45:02 +02:00
Lennart Poettering
9f2e86af06 core: allow setting of the description string for transient units 2013-07-01 00:40:56 +02:00
Lennart Poettering
6c12b52e19 core: add new "scope" unit type for making a unit of pre-existing processes
"Scope" units are very much like service units, however with the
difference that they are created from pre-existing processes, rather
than processes that systemd itself forks off. This means they are
generated programmatically via the bus API as transient units rather
than from static configuration read from disk. Also, they do not provide
execution-time parameters, as at the time systemd adds the processes to
the scope unit they already exist and the parameters cannot be applied
anymore.

The primary benefit of this new unit type is to create arbitrary cgroups
for worker-processes forked off an existing service.

This commit also adds a a new mode to "systemd-run" to run the specified
processes in a scope rather then a transient service.
2013-07-01 00:18:00 +02:00
Lennart Poettering
a00963a2e4 systemctl: show per-unit cgroup tree correctly following the new property 2013-07-01 00:18:00 +02:00
Lennart Poettering
a190eeb884 snapshot: snapshots are just a special kind of transient units now 2013-07-01 00:18:00 +02:00
Lennart Poettering
6a95dff87d dbus: expose cgroup properties in introspection everywhere 2013-07-01 00:18:00 +02:00
Lennart Poettering
64fad95a32 service: correct service bus introspection for timeouts 2013-07-01 00:17:59 +02:00
Lennart Poettering
b56c28c31a cgroup: implicitly add units to GC queue when their cgroups run empty 2013-07-01 00:17:59 +02:00
Lennart Poettering
0a1eb06d9a cgroup: readd proper cgroup empty tracking 2013-07-01 00:17:59 +02:00
Jason St. John
1e158d273b man: fix spacing issue in various man pages
Before: libsystemd-daemonpkg-config(1)
After: libsystemd-daemon pkg-config(1)

This fix is more complicated than it should be due to the consecutive
XML elements separated by collapsible whitespace.

Merging the lines and separating the XML elements with an en space or a
non-breaking space is the only solution that results in one, and only
one, space being inserted between them when testing. An em space results
in two spaces being inserted.
2013-06-29 10:28:57 -04:00
Zbigniew Jędrzejewski-Szmek
54ca4fc85b build-sys: "link" libsystemd-id128.so with libsystemd-label
Fixed build on debian wheezy:
./.libs/libudev.so: undefined reference to `cg_create'

Appears to have no influence on the resulting binaries and
libraries. Cf. b5fafdf63f.
2013-06-29 10:28:57 -04:00
Lennart Poettering
11ddb6f48e main: fix loading of default target 2013-06-28 18:37:15 +02:00
장동준
cda4380d9f keymap: Add Samsung Series 3
Signed-off-by: Martin Pitt <martinpitt@gnome.org>
2013-06-28 10:51:28 +02:00
Lennart Poettering
c2756a6840 core: add transient units
Transient units can be created via the bus API. They are configured via
the method call parameters rather than on-disk files. They are subject
to normal GC. Transient units currently may only be created for
services (however, we will extend this), and currently only ExecStart=
and the cgroup parameters can be configured (also to be extended).

Transient units require a unique name, that previously had no
configuration file on disk.

A tool systemd-run is added that makes use of this functionality to run
arbitrary command lines as transient services:

$ systemd-run /bin/ping www.heise.de

Will cause systemd to create a new transient service and run ping in it.
2013-06-28 04:12:58 +02:00
Lennart Poettering
1508e85878 dbus: fix minor memory leak when sending job change signals 2013-06-28 03:47:40 +02:00
Lennart Poettering
241da3287d unit: make sure the dropins we write are high-priority 2013-06-28 00:41:24 +02:00
Lennart Poettering
74c964d369 dbus: hookup runtime property changes for mouns, services, sockets, swaps too 2013-06-27 23:21:21 +02:00
Lennart Poettering
7041efe960 dbus: make DeviceAllow=/DevicePolicy= writable 2013-06-27 23:13:17 +02:00
Lennart Poettering
b42defe3b8 dbus: make more cgroup attributes runtime settable 2013-06-27 21:50:35 +02:00
Lennart Poettering
8e2af47840 dbus: add infrastructure for changing multiple properties at once on units and hook some cgroup attributes up to it
This introduces two bus calls to make runtime changes to selected bus
properties, optionally with persistence.

This currently hooks this up only for three cgroup atributes, but this
brings the infrastructure to add more changable attributes.

This allows setting multiple attributes at once, and takes an array
rather than a dictionary of properties, in order to implement simple
resetting of lists using the same approach as when they are sourced from
unit files. This means, that list properties are appended to by this
call, unless they are first reset via assigning the empty list.
2013-06-27 21:14:56 +02:00
Jan Janssen
aae72d6fa0 journal-verify: Use proper printf placeholder 2013-06-27 10:55:19 -04:00
Jan Janssen
3b18ae6866 test: Add list testcase 2013-06-27 01:38:47 -04:00
Lennart Poettering
4ad490007b core: general cgroup rework
Replace the very generic cgroup hookup with a much simpler one. With
this change only the high-level cgroup settings remain, the ability to
set arbitrary cgroup attributes is removed, so is support for adding
units to arbitrary cgroup controllers or setting arbitrary paths for
them (especially paths that are different for the various controllers).

This also introduces a new -.slice root slice, that is the parent of
system.slice and friends. This enables easy admin configuration of
root-level cgrouo properties.

This replaces DeviceDeny= by DevicePolicy=, and implicitly adds in
/dev/null, /dev/zero and friends if DeviceAllow= is used (unless this is
turned off by DevicePolicy=).
2013-06-27 04:17:34 +02:00
Lennart Poettering
abb26902e4 core: don't do runaway fork()s if we hit a segfault from our segfault handler 2013-06-27 04:17:33 +02:00
Zbigniew Jędrzejewski-Szmek
5841bd803f killall: do not use alloca() in argument list
It is not allowed.
2013-06-26 19:52:00 -04:00
Zbigniew Jędrzejewski-Szmek
7ac4fa7e92 journalctl: highlight MESSAGE= in verbose output
When looking at verbose output, additional "work" is required to
pick out the interesting MESSAGE= lines from all the fields.

Also, show long fields in full in verbose output mode when
OUTPUT_FULL_WIDTH is specified.
2013-06-26 19:52:00 -04:00
Zbigniew Jędrzejewski-Szmek
785a51eb68 man: add CONSTANTS section to systemd.directives(7) 2013-06-26 19:52:00 -04:00
Zbigniew Jędrzejewski-Szmek
74d005783e man: use <constant> for various constants which look ugly with quotes 2013-06-26 19:47:34 -04:00
Zbigniew Jędrzejewski-Szmek
909f413d3c man: always supply quotes around literals
When manpages are displayed on a terminal, <literal>s are indistinguishable
from surrounding text. Add quotes everywhere, remove duplicate quotes,
and tweak a few lists for consistent formatting.

https://bugzilla.redhat.com/show_bug.cgi?id=874631
2013-06-26 08:05:14 -04:00
Harald Hoyer
3b05b8b3b5 systemctl: conform to LSB with the "status" return code
check for pid file existance before returning 1
2013-06-25 16:28:00 +02:00
David King
aed63d6758 man: Small language improvements to sd_journal_open 2013-06-25 07:52:01 -04:00
Harald Hoyer
175728c45f systemctl: conform to LSB with the "status" return code
http://fedoraproject.org/wiki/Packaging:SysVInitScript#Exit_Codes_for_the_Status_Action

https://bugzilla.redhat.com/show_bug.cgi?id=975016
2013-06-25 13:08:27 +02:00