Commit graph

105 commits

Author SHA1 Message Date
Lennart Poettering 57020a3abf unit: properly update references to units which are merged
When we merge units that some kind of object points to, those pointers
might become invalidated, and needs to be updated. Introduce a UnitRef
struct which links up all the unit references, to ensure corrected
references.

At the same time, drop configured_sockets in the Service object, and
replace it by proper UNIT_TRIGGERS resp. UNIT_TRIGGERED_BY dependencies,
which allow us to simplify a lot of code.
2012-01-06 23:08:54 +01:00
Michal Schmidt f6cebb3bd5 let mount and swap units log to the configured defaults
Related-to: https://bugzilla.redhat.com/show_bug.cgi?id=750032
2011-11-19 03:16:55 +01:00
Lennart Poettering 7fc2a89a73 mount: order remote mounts after both network.target and remote-fs-pre.target
Since remote-fs-pre.target is optional we cannot count on it to order
remote mounts after network.target, so let's add that order explicitly
in addition to remote-fs-pre.target.

https://bugzilla.redhat.com/show_bug.cgi?id=749940
2011-11-01 22:28:59 +01:00
Lennart Poettering 21e557edcc units: introduce local-fs-pre.target and remote-fs-pre.target
This hook target enables services to order themselves between
network.target and remote mounts, which is needed for GFS2 and similar
systems.
2011-10-11 03:33:53 +02:00
Lennart Poettering d3354f66c2 mount: pull in quota tools from fstab lines with 'quota' option, too
https://bugzilla.redhat.com/show_bug.cgi?id=736360
2011-09-21 20:19:43 +02:00
Lennart Poettering 3a34ae3a4d mount: fix parsing of prio value
https://bugzilla.redhat.com/show_bug.cgi?id=722803
2011-08-31 01:46:38 +02:00
Lennart Poettering ab1f063390 exec: optionally apply cgroup attributes to the cgroups we create 2011-08-20 00:22:02 +02:00
Lennart Poettering f975e971ac load-fragment: speed up parsing by using a perfect hash table with configuration settings built by gperf 2011-08-01 00:43:05 +02:00
Lennart Poettering a17204af0e unit: use ESRCH as error when we don't find anybody to kill 2011-07-13 19:59:28 +02:00
Lennart Poettering 3611581ebd service: properly handle who argument on D-Bus kill calls 2011-07-12 04:05:33 +02:00
Lennart Poettering ab5c3e3ff1 english: s/_per_/_by_/ 2011-06-21 19:29:44 +02:00
Lennart Poettering 6ea832a207 exec: hangup/reset/deallocate VTs in gettys
Explicitly disconnect all clients from a VT when a getty starts/finishes
(requires TIOCVHANGUP, available in 2.6.29).

Explicitly deallocate getty VTs in order to flush scrollback buffer.

Explicitly reset terminals to a defined state before spawning getty.
2011-05-18 01:07:36 +02:00
Lennart Poettering 155da45729 mount,crypto: rework meaning of noauto/nofail 2011-04-20 00:45:22 +02:00
Lennart Poettering f4c0514703 mount: properly parse timeouts options in the middle of the string 2011-04-19 22:09:34 +02:00
Lennart Poettering 8024c3a71a mount: make device timeout configurable 2011-04-16 04:39:50 +02:00
Lennart Poettering c8f4d7642b manager: introduce IgnoreOnIsolate flag so that we can keep systemd-logger around when isolating 2011-04-16 02:03:34 +02:00
Lennart Poettering d893269d9f mount: don't pull in stdio logger for root mount unit 2011-04-13 04:34:35 +02:00
Lennart Poettering 33ff02c9fe mount: block creation of mount units for API file systems 2011-04-05 23:39:21 +02:00
Lennart Poettering da19d5c19f src: our lord is coverity 2011-03-31 15:35:40 +02:00
Lennart Poettering cb39ed3fde quota: do not pull in quota tools for mounts that do not originate in neither /etc/fstab nor fragment files 2011-03-30 01:53:34 +02:00
Lennart Poettering cd25cce98f exec: drop process group kill mode since it has little use and confuses the user 2011-03-29 23:31:38 +02:00
Kay Sievers 2b583ce657 use /run instead of /dev/.run
Instead of the /dev/.run trick we have currently implemented, we decided
to move the early-boot runtime dir to /run.

An existing /var/run directory is bind-mounted to /run. If /var/run is
already a symlink, no action is taken.

An existing /var/lock directory is bind-mounted to /run/lock.
If /var/lock is already a symlink, no action is taken.

To implement the directory vs. symlink logic, we have a:
  ConditionPathIsDirectory=
now, which is used in the mount units.

Skipped mount unit in case of symlink:
  $ systemctl status var-run.mount
  var-run.mount - Runtime Directory
    Loaded: loaded (/lib/systemd/system/var-run.mount)
    Active: inactive (dead)
            start condition failed at Fri, 25 Mar 2011 04:51:41 +0100; 6min ago
     Where: /var/run
      What: /run
    CGroup: name=systemd:/system/var-run.mount

The systemd rpm needs to make sure to add something like:
  %pre
  mkdir -p -m0755 /run >/dev/null 2>&1 || :
or it needs to be added to filesystem.rpm.

Udev -git already uses /run if that exists, and is writable at bootup.
Otherwise it falls back to the current /dev/.udev.

Dracut and plymouth need to be adopted to switch from /dev/.run to run
too.

Cheers,
Kay
2011-03-28 23:00:00 +02:00
Andrey Borzenkov 0c380104cf mount: pull in quota services from local mountpoints with usr/grpquota options 2011-03-18 19:12:58 +03:00
Lennart Poettering f6a6225e41 def: centralize definition of default timeout in one place 2011-03-17 04:02:35 +01:00
Lennart Poettering d4a7e06dea mount: support less cumbersome x-systemd-xxx mount options 2011-03-08 03:08:15 +01:00
Lennart Poettering 430c18ed7f kill: always send SIGCONT after SIGTERM
When we kill a process to terminate it make sure to send SIGCONT to
ensure it is unpaused and processes the signal.
2011-03-03 23:55:30 +01:00
Lennart Poettering 50483512b9 mount: make sure network mounts are ordered after network.target 2011-02-21 13:32:18 +01:00
Lennart Poettering 27abbe8251 mount,swap: properly add dependencies to logger if needed 2011-02-15 12:28:26 +01:00
Lennart Poettering 0a494f1ff3 exec: introduce global defaults for the standard output of services 2011-02-15 11:52:29 +01:00
Lennart Poettering ff2e0f0514 mount: ignore if an fsck is requested for a bind mount, so that we don't wait for the bind 'device' to show up 2011-01-21 01:28:30 +01:00
Lennart Poettering e0fa621b8b automount: fix segfault when shutting down
https://bugs.freedesktop.org/show_bug.cgi?id=32076
2011-01-21 01:13:15 +01:00
Lennart Poettering 9a57c62944 systemctl: highlight failed processes in systemctl status 2011-01-20 18:22:03 +01:00
Lennart Poettering e2f3b44cfc service: when reloading a service fails don't fail the entire service but just the reload job 2011-01-20 13:17:22 +01:00
Lennart Poettering ba035df230 execute: make sending of SIGKILL on shutdown optional 2011-01-18 22:55:54 +01:00
Lennart Poettering d686d8a97b cgroup: by default, duplicate service cgroup in the cpu hierarchy 2010-11-17 21:27:53 +01:00
Kay Sievers 57f2a956e6 split mount_point_is_api() and mount_point_ignore()
We should not handle the ignore list as API mounts, as
systemd itself never touches them.

On Thu, Nov 11, 2010 at 10:34, Andreas Jaeger <aj@novell.com> wrote:
>
> I noticed for some time that systemd-remount-api-vfs is in the
> failed state and found now the following in the log files
>
> systemd-remount-api-vfs[467]: /bin/mount for /proc/bus/usb exited with exit status 32.
> systemd-remount-api-vfs[467]: mount: /proc/bus/usb not mounted already, or bad option
> systemd[1]: systemd-remount-api-vfs.service: main process exited, code=exited, status=1
> systemd[1]: Unit systemd-remount-api-vfs.service entered failed state.
2010-11-11 11:15:16 +01:00
Lennart Poettering e23a0ce8ba cryptsetup: minimal cryptsetup unit generator 2010-11-10 22:38:43 +01:00
Lennart Poettering d91430063e mount: don't pull in nofail mounts by default, but use them if they are around 2010-10-29 16:28:30 +02:00
Lennart Poettering ead8e4788e unit: get rid of gnoreDependencyFailure= instead treat ConflictedBy= as weaker counterpart of Conflicts=, similar to Wants= vs. Requires= 2010-10-29 16:28:27 +02:00
Lennart Poettering b81884e746 unit: replace StopRetroactively= by BindTo= dependencies
The property StopRetroactively= needs to be per-dependency, not
per-unit, in order to properly express dependencies between .mount units
and its .device and fsck .service units. If the .device unit is
unplugged the mount should go away, but if the fsck process terminates
the .mount should stay.
2010-10-29 00:45:46 +02:00
Lennart Poettering f14e15f8af unit: replace recursive_stop by stop_retroactively to simplify things a little 2010-10-28 03:38:52 +02:00
Lennart Poettering 510051fc12 swap: add only swaps listed in /etc/fstab automatically to swap.target, others should be added via .wants/ links 2010-10-26 22:58:54 +02:00
Lennart Poettering 8a0867d6c5 systemctl: introduce systemctl kill 2010-10-22 16:11:50 +02:00
Lennart Poettering 417e842dc3 mount: pull in quotacheck.service, not quotacheck.target 2010-10-20 15:21:44 +02:00
Lennart Poettering 0355825f59 mount: require fsck 2010-10-20 15:21:05 +02:00
Lennart Poettering b65a25f256 mount: do not implicitly pull in fsck service for root dir 2010-10-20 14:26:46 +02:00
Lennart Poettering a9e1f5ec36 fsck: properly hook in fsck everywhere, add special support for fsck'ing root dir 2010-10-19 23:45:18 +02:00
Lennart Poettering 4e4343146a swap: listen for POLLPRI events on /proc/swaps if available 2010-10-18 23:09:09 +02:00
Lennart Poettering 491ad5dc66 mount: pull in fsck only in systemd instances 2010-10-13 17:18:36 +02:00
Lennart Poettering 9fff8a1f16 mount: hook in q fsck@.service instance for all mount points with passno > 0 2010-10-13 03:57:04 +02:00