1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 18:55:40 +03:00
Commit Graph

613 Commits

Author SHA1 Message Date
Lennart Poettering
04b6f7c1a7 rc-local-generator: hook halt-local in based on generator too 2012-05-03 16:00:49 +02:00
Lennart Poettering
7c8fa05c4d unit: add new dependency type RequiresMountsFor=
RequiresMountsFor= is a shortcut for adding requires and after
dependencies to all mount units neeed for the specified paths.

This solves a couple of issues regarding dep loop cycles for encrypted
swap.
2012-04-30 10:52:07 +02:00
Michal Schmidt
e0209d83e7 core: add NOP jobs, job type collapsing
Two of our current job types are special:
JOB_TRY_RESTART, JOB_RELOAD_OR_START.

They differ from other job types by being sensitive to the unit active state.
They perform some action when the unit is active and some other action
otherwise. This raises a question: when exactly should the unit state be
checked to make the decision?

Currently the unit state is checked when the job becomes runnable. It's more
sensible to check the state immediately when the job is added by the user.
When the user types "systemctl try-restart foo.service", he really intends
to restart the service if it's running right now. If it isn't running right
now, the restart is pointless.

Consider the example (from Bugzilla[1]):

sleep.service takes some time to start.
hello.service has After=sleep.service.
Both services get started. Two jobs will appear:
 hello.service/start  waiting
 sleep.service/start  running
Then someone runs "systemctl try-restart hello.service".

Currently the try-restart operation will block and wait for
sleep.service/start to complete.

The correct result is to complete the try-restart operation immediately
with success, because hello.service is not running. The two original
jobs must not be disturbed by this.

To fix this we introduce two new concepts:
- a new job type: JOB_NOP
  A JOB_NOP job does not do anything to the unit. It does not pull in any
  dependencies. It is always immediately runnable. When installed to a unit,
  it sits in a special slot (u->nop_job) where it never conflicts with
  the installed job (u->job) of a different type. It never merges with jobs
  of other types, but it can merge into an already installed JOB_NOP job.

- "collapsing" of job types
  When a job of one of the two special types is added, the state of the unit
  is checked immediately and the job type changes:
  JOB_TRY_RESTART     -> JOB_RESTART or JOB_NOP
  JOB_RELOAD_OR_START -> JOB_RELOAD or JOB_START
  Should a job type JOB_RELOAD_OR_START appear later during job merging, it
  collapses immediately afterwards.
  Collapsing actually makes some things simpler, because there are now fewer
  job types that are allowed in the transaction.

[1] Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=753586
2012-04-25 18:38:27 +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
2b93b027d3 remount: consolidate remount-api-vfs and remount-rootfs into one
This has the advantage of removing a confusing warning by mount if the
root directory is not listed in fstab.
2012-04-24 16:42:42 +02:00
Lennart Poettering
337eebb936 container: spawn a getty instead of a sulogin in a container 2012-04-22 02:41:18 +02:00
Lennart Poettering
f1e5dfe2c0 nspawn: make /dev/kmsg unavailable in the container, but allow access to /proc/kmsg 2012-04-22 00:32:53 +02:00
Kay Sievers
33e48d472e man: doc-sync - properly delete no longer existing stuff on remote server 2012-04-21 00:28:02 +02:00
Michal Schmidt
75778e21df manager: split transaction.[ch]
manager.c takes care of the main loop, unit management, signal handling, ...
transaction.c computes transactions.

After split:
manager.c:     65 KB
transaction.c: 40 KB
2012-04-20 17:12:27 +02:00
Kay Sievers
80037e4d17 docs: rebase html documentation for online and local use 2012-04-19 19:00:35 +02:00
Kay Sievers
88f642c00b build-sys: move dev-setup to label.la 2012-04-18 16:13:37 +02:00
Kay Sievers
5ba2dc259f udev: unify /dev static symlink setup 2012-04-17 22:31:38 +02:00
Kay Sievers
80a5cbace4 build-sys: silence gtk-doc check, remove gtk-doc options from configure and distcheck 2012-04-17 17:11:02 +02:00
Javier Jardón
92ec4495f7 build-sys: make gtk-doc dependency optional 2012-04-17 17:01:21 +02:00
Kay Sievers
e9a5ef7cdd selinux: unify systemd and udev code 2012-04-17 16:05:28 +02:00
Kay Sievers
9e13dbae50 udev: replace util_create_path() with mkdir_parents() 2012-04-17 01:09:39 +02:00
Kay Sievers
f13b388f97 udev: install udevd as /usr/lib/systemd/systemd-udevd 2012-04-17 00:18:30 +02:00
Kay Sievers
33502ffe2e udev: use startswith() and streq() 2012-04-16 20:54:17 +02:00
Kay Sievers
6ada823a9a udev: remove configuration options for /dev, /sys, /run directories 2012-04-16 19:20:57 +02:00
Lennart Poettering
f8e2fb7b14 logind: add shutdown/suspend/idle inhibition framework 2012-04-16 18:59:08 +02:00
Kay Sievers
20d83f2f43 udev: move all unconditionally installed rules to rules/ 2012-04-14 20:10:03 +02:00
Kay Sievers
8ea5c07b1c udev: keymap - move src/udev/force-release-maps/ to keymaps-force-release/ 2012-04-14 19:53:31 +02:00
Kay Sievers
0b87a07761 udev: test - move test/ and src/test/ 2012-04-14 19:36:47 +02:00
Kay Sievers
7c1d34c5d4 build-sys: silence the xsltproc output 2012-04-14 18:05:06 +02:00
Kay Sievers
690804ca8e build-sys: add 'make doc-sync' target 2012-04-13 23:51:22 +02:00
Kay Sievers
bb061708d5 udev: move libudev, gudev to src/; move gudev/docs/, udev/docs/ to to docs/ 2012-04-13 19:22:06 +02:00
Martin Pitt
84f4fc4215 keymap: Add Dell XPS force-release quirk
https://launchpad.net/bugs/910911
2012-04-13 17:17:22 +02:00
Kay Sievers
9b80f05fb7 udev: unpack sysfs test tree only on 'make check'; fix test-udev binary location 2012-04-13 15:57:13 +02:00
Kay Sievers
56d35ff9ca udev: keymap - move data files to root directory 2012-04-13 15:38:15 +02:00
Kay Sievers
b49d9b50cf udev: fix a few issues detected by the llvm static analyzer 2012-04-13 15:10:12 +02:00
Lennart Poettering
64695e53a0 build-sys: drop systemd- prefix from analyze dir 2012-04-13 13:34:09 +02:00
Kay Sievers
e0eaab7cd1 build-sys: execute test programs with 'make check' 2012-04-13 13:21:20 +02:00
Kay Sievers
0eaeca1f23 udev: use native instead of custom --disable-introspection logic 2012-04-13 12:49:51 +02:00
Kay Sievers
4193534e12 udev: link some systemd parts statically to limit shared libararies dependencies for standalone use 2012-04-13 12:34:35 +02:00
Lennart Poettering
ae572d87c5 build-sys: move systemd-analyze into its own subdir 2012-04-12 20:28:00 +02:00
Kay Sievers
6b8b149a21 udev: properly hook up all tests to 'make check' 2012-04-12 19:25:41 +02:00
Kay Sievers
6cbf079f10 build-sys: use check_PROGRAMS for test-*.c 2012-04-12 19:00:28 +02:00
Kay Sievers
b7739c77df build-sys: remove $(DBUS_LIBS), libsystemd-dbus.la pulls it in 2012-04-12 18:30:24 +02:00
Kay Sievers
43a1ab9b90 pam_systemd: add dbus.la 2012-04-12 18:30:24 +02:00
Lennart Poettering
c0a0872d5c build-sys: move src/linux/ to src/shared/linux 2012-04-12 18:27:35 +02:00
Lennart Poettering
0f4e02c220 build-sys: create top-level directory for bash completion 2012-04-12 18:26:30 +02:00
Lennart Poettering
08e1fb68d7 build-sys: move *-setup out of shared to avoid selinux being pulled in 2012-04-12 18:19:34 +02:00
Kay Sievers
dce818b390 move all tools to subdirs 2012-04-12 17:54:42 +02:00
Lennart Poettering
4fc5568804 machine-id-setup: avoid cyclic dependency, built twice instead 2012-04-12 17:53:19 +02:00
Lennart Poettering
41e5171419 build-sys: split off logs-show into its own convenience library 2012-04-12 17:42:09 +02:00
Lennart Poettering
bd5b0d57ef build-sys: introduce seperate convenience library for dbus stuff 2012-04-12 17:24:58 +02:00
Kay Sievers
d41ba529b4 move libsystemd-id128, libsystemd-daemon to subdir 2012-04-12 15:26:39 +02:00
Kay Sievers
3bdf9c1d0a move remainig shared stuff to shared/ 2012-04-12 15:11:39 +02:00
Lennart Poettering
2c4ff63406 detect-virt: make detect-virt an official command 2012-04-12 14:58:52 +02:00
Kay Sievers
ec1a9f88f2 rename bridge.c to stdio-bridge.c and move to subdir 2012-04-12 14:30:42 +02:00