Commit graph

10833 commits

Author SHA1 Message Date
Lennart Poettering e8d2f6cde0 units: introduce remote-fs-setup.target to pull in dependencies from remote mounts
This introduces remote-fs-setup.target independently of
remote-fs-pre.target. The former is only for pulling things in, the
latter only for ordering.

The new semantics:

remote-fs-setup.target: is pulled in automatically by all remote mounts.
Shall be used to pull in other units that want to run when at least one
remote mount is set up. Is not ordered against the actual mount units,
in order to allow activation of its dependencies even 'a posteriori',
i.e. when a mount is established outside of systemd and is only picked
up by it.

remote-fs-pre.target: needs to be pulled in automatically by the
implementing service, is otherwise not part of the initial transaction.
This is ordered before all remote mount units.

A service that wants to be pulled in and run before all remote mounts
should hence have:

a) WantedBy=remote-fs-setup.target -- so that it is pulled in

b) Wants=remote-fs-pre.target + Before=remote-fs-pre.target -- so that
   it is ordered before the mount point, normally.
2013-03-25 22:04:40 +01:00
Lennart Poettering a69fe051b8 Revert "remote-fs.target: want remote-fs-pre.target"
This reverts commit 6bde0b3220.

We should not pull in remote-fs-pre.target unconditionally. It's
supposed to be pulled in by the implementors of it, rather then its
users.
2013-03-25 21:29:58 +01:00
Lennart Poettering b17959153a units: and also, order all early-boot sockets before sockets.target 2013-03-25 21:29:09 +01:00
Lennart Poettering b0afe214c0 units: order all udev services before sysinit.target, too
Not that it would matter much, but let's make things a bit more
systematic: early boot services shall order themselves before
sysinit.target, and nothing else.
2013-03-25 21:29:09 +01:00
Lennart Poettering ee64428ec2 update TODO 2013-03-25 21:29:09 +01:00
Lennart Poettering e3d84721dc units: introduce new timers.target and paths.target to hook timer/path units into for boot 2013-03-25 21:28:30 +01:00
Mantas Mikulėnas 1b036593b7 fstab-generator: add missing strempty() calls 2013-03-25 20:14:29 +01:00
Kay Sievers 5ec6b15b65 build-sys: add missing sed substitution for DEBUGTTY 2013-03-25 19:28:00 +01:00
Umut Tezduyar d95fd3df59 build-sys: configurable debug shell tty path 2013-03-25 18:40:38 +01:00
Lennart Poettering 80c39ad27f fstab-generator: fix minor memory leak on error path 2013-03-25 18:20:03 +01:00
Lennart Poettering df3e57f542 fstab-generator: add missing OOM check 2013-03-25 18:20:03 +01:00
Lennart Poettering 790838e4f1 fstab-generator: rename x-initrd-rootfs.mount to x-initrd.rootfs
This changes the fstab mount option x-initrd-rootfs.mount to
x-initrd.rootfs, in order to only use a single namespace "x-initrd." for
all mount options of the initrd.
2013-03-25 18:18:11 +01:00
Lennart Poettering eece8c6fb5 update TODO 2013-03-25 18:17:15 +01:00
Oleksii Shevchuk 26687bf8a9 journal: Add sync timer to journal server
Add option to force journal sync with fsync. Default timeout is 5min.
Interval configured via SyncIntervalSec option at journal.conf. Synced
journal files will be marked as OFFLINE.

Manual sync can be performed via sending SIGUSR1.
2013-03-25 17:51:06 +01:00
Lennart Poettering a9602630c6 update TODO 2013-03-25 17:26:15 +01:00
Frederic Crozat ce2c226537 core: ensure LSB Provides are handled correctly
Let's say you have two initscripts, A and B:

A contains in its LSB header:
Required-Start: C

and B contains in its LSB header:
Provides: C

When systemd is parsing /etc/rc.d/, depending on the file order, you
can end up with either:
- B is parsed first. An unit "C.service" will be "created" and will be
added as additional name to B.service, with unit_add_name. No bug.
- A is parsed first. An unit "C.service" is created for the
"Required-Start" dependency (it will have no file attached, since
nothing provides this dependency yet). Then B is parsed and when trying
to handle "Provides: C", unit_add_name is called but will fail, because
"C.service" already exists in manager->units. Therefore, a merge should
occur for that case.
2013-03-25 17:26:15 +01:00
Harald Hoyer 8cc3f8c0bc udevd.c: set udev children_max according to CPU count
Setting children_max according to RAM leads to too much concurrent I/O.
2013-03-25 13:11:18 +01:00
Michal Schmidt c5962bd1d1 timer: downgrade time change message to debug
The manager already prints "Time has been changed" at level info. It
seems too verbose to print the time change message additionally for
every waiting timer unit.

Downgrade the per-unit message to debug.
2013-03-25 12:31:44 +01:00
Lennart Poettering a7e3212d89 bus: split socket related code into bus-socket.[ch], to prepare for kdbus backend 2013-03-25 03:43:19 +01:00
Lennart Poettering 2fd9ae2e9b bus: implement 'unixexec:' protocol 2013-03-25 02:33:35 +01:00
Lennart Poettering 021a1e78d7 bus: make optional whether unix socket passing is negotiated and whether hello is sent
This alos gets rid of explicit sd_open_fd() and sd_open_address()
constructors in favour of sd_new() + sd_new_start() where the
negotiation parameters may be set it in between.
2013-03-25 02:33:35 +01:00
Lennart Poettering 66f931b4c8 bus: properly handle termination of connections 2013-03-25 02:33:35 +01:00
Lennart Poettering 2c93b4efec bus: implement support for FD passing 2013-03-25 02:33:34 +01:00
Miklos Vajna 3f95f83c54 service: no need to drop rc. prefix anymore
This reverts commit f5c88ec133. It is no
longer necessary, and adds unnecessary magic.
2013-03-24 12:42:41 +01:00
Kay Sievers 7964dfca1b journald: remove unconditional log_*() use in the main loop
Setting MaxRetentionSec= caused the kernel log to overflow and the
journal daemon to enter an endless loop.

Logging from the journald main loop gets directed to /dev/kmsg,
which wakes up journald again. We skip the import of this message
by checking for our own PID, but this still causes the main loop
to never go to sleep again because we never stopped logging from
there.
2013-03-23 21:09:37 +01:00
Kay Sievers 7eb1dfcfc4 TODO: add journal MaxRetentionSec= bug 2013-03-23 20:36:05 +01:00
Kay Sievers 1d09582ab9 hwdb: ID_PRODUCT_FROM_DATABASE --> ID_MODEL_FROM_DATABASE
With the conversion from pci-db + usb-db to hwdb, the property
got accitentially renamed.

Move the name back to the long established identifier *MODEL*
instead of *PRODUCT*.

  $ git grep -l ID_MODEL_FROM_DATABASE
  hwdb/20-pci-vendor-model.hwdb
  hwdb/20-usb-vendor-model.hwdb
  hwdb/ids-update.pl
  man/systemd.device.xml
  rules/78-sound-card.rules
  src/core/device.c
  src/cryptsetup/cryptsetup.c
2013-03-23 16:38:21 +01:00
Kay Sievers bb06e0f85c uaccess: remove needless usb_id call from udev rules 2013-03-23 16:30:49 +01:00
Frederic Crozat 89d09e1b5c udevd: ensure static nodes are created before local-fs mount
static nodes (like /dev/loop-control) are created when systemd-udevd
is started and needed to mount loopback devices. Therefore,
local-fs-pre.target should be only started after systemd-udevd is
started.
2013-03-23 15:17:39 +01:00
Kay Sievers d325d9bcfa TODO: add "dead" device node ACL handling 2013-03-23 14:01:44 +01:00
Kay Sievers b87b8b2b52 TODO: update 2013-03-23 13:34:13 +01:00
Auke Kok 3abcb6aced Update user session unit template.
While most folks will be using the derivative from user-session-units,
I'm updating this one to reflect some of the fixes and things to note
about user sessions:

- cgroup should be set with "%u" - username instead of %I
- set dbus path with %U explicitly too
- hint to folks that wish to use MEM_CG features in user sessions
- allow unit to be enabled for instances with systemctl enable
2013-03-22 21:43:31 -07:00
Lennart Poettering 4589f5bb0a conf-parser: when we parse a string list, always fill in something
Some code really wants to know whether there was a string list parsed,
so don't take the shortcut here, and always allocate a string list, even
if it is an empty one.

https://bugs.freedesktop.org/show_bug.cgi?id=62558
2013-03-23 04:32:43 +01:00
Lennart Poettering 54b1da83ed journal: don't access j->files after use
https://bugs.freedesktop.org/show_bug.cgi?id=62605
2013-03-23 04:14:20 +01:00
Zbigniew Jędrzejewski-Szmek 46512cd959 udevadm: place const in the right place
Otherwise clang at least thinks that both consts apply to char.
2013-03-22 23:08:17 -04:00
Zbigniew Jędrzejewski-Szmek 9e1fe7c3db bus: don't free an unallocated var
Also remove unused variable.
2013-03-22 23:08:17 -04:00
Zbigniew Jędrzejewski-Szmek cb695f05c5 bus: move attribute to end of structure, so it is not ignored
src/libsystemd-bus/bus-message.h:41:1: warning: attribute 'packed' is ignored, place it after
      "struct" to apply attribute to type declaration [-Wignored-attributes]
2013-03-22 23:08:16 -04:00
Lennart Poettering 67c67c8f19 update TODO 2013-03-23 04:03:32 +01:00
Lennart Poettering 64e30145fc update TODO 2013-03-23 03:19:55 +01:00
Lennart Poettering 335b5240ae unit: never retroactively start requisites
Requesites are not supposed to be auto-started afterall, they are just
checks, so don't try to be smarter here than appropriate.

Based on a patch from Michal Schmidt.
2013-03-23 03:16:17 +01:00
Lennart Poettering 0debd2bf2f Revert "units: ignore systemd-sysctl on shutdown"
This reverts commit faeffa73a8.

There isn't really much point in dropping the Conflicts= since shutting
down this service is basically free as it doesn't have anything running.

Also, the patch was incomplete, because shutdown.target was still listed
in Before=.
2013-03-23 03:10:41 +01:00
Cristian Rodríguez 4ad61fd180 add --with-telinit=PATH configure option
Distributions that never shipped upstart do not have
"telinit" in /lib/upstart/..

Defaults to /lib/upstart/telinit so there is no change
for systems existing installs.
2013-03-23 01:44:56 +01:00
Lennart Poettering 3ac251b81a journalctl: various fixes to the access check logic
- Reword messages a bit

- Correct check whether EACCES is in the set of errors

- Don't complain if no journal files are found

- allocate Set object for errors lazily since in the best case we don't
  need it at all.

- don't consider it an error if /run/log/journal doesn't exist (because
  that's the usual case actually, if storage is enabled)
2013-03-23 01:12:22 +01:00
Colin Walters a5a5ade34c dbus: Do send out "replies" to signals
Some parts of systemd (at least the DBus activation codepath) "reply"
to signals, which of course have the no-reply flag set.  We will be
defensive here and still send out a reply if we're passed a signal.

Regression introduced by: c6a818c820

Reported-by: Mantas Mikulėnas <grawity@gmail.com>
Tested-by: Mantas Mikulėnas <grawity@gmail.com>
2013-03-22 23:37:11 +01:00
Lennart Poettering 356ce9915a update TODO 2013-03-22 23:28:44 +01:00
Lennart Poettering d91c34f21f exec: Assigning the empty string to CapabilityBoundSet= should drop all caps
Previously, it would set all caps, but it should drop them all, anything
else makes little sense.

Also, document that this works as it does, and what to do in order to
assign all caps to the bounding set.

https://bugzilla.redhat.com/show_bug.cgi?id=914705
2013-03-22 23:28:44 +01:00
Tollef Fog Heen 6af274272a Drop trailing whitespace 2013-03-22 22:51:52 +01:00
Lennart Poettering 86e7b6e3f6 timedated: extra overflow safety check when doing relative time changes
Ensure clients don't overflow usec_t when doing relative time changes.
This is mostly just paranoia and protection against accidents, after all
clients are already authenticated, and they can se the time to any
value they wish anyway, but better be safe than sorry.

https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1152187/comments/14
2013-03-22 21:38:49 +01:00
Lennart Poettering bfa00bc6c0 update TODO 2013-03-22 21:18:10 +01:00
Lennart Poettering 1a5613266a timedatectl: show CanNTP field 2013-03-22 21:18:10 +01:00