Commit graph

629 commits

Author SHA1 Message Date
Lennart Poettering ba1261bc02 build-sys: fix built with --disable-logind 2012-05-30 22:25:01 +02:00
Lennart Poettering 069cfc85f8 logind: optionally handle power, sleep and lid switch events
This takes handling of chassis power and sleep keys as well as the lid
switch over from acpid.

This logic is enabled by default for power and sleep keys, but not for
the lid switch.

If a graphical session is in the foreground no action is taken under the
assumption that the graphical session does this.
2012-05-30 15:01:51 +02:00
Lennart Poettering 9262a51946 build-sys: prepare release 183 2012-05-24 15:44:38 +02:00
Lennart Poettering 1897573598 readahead: when doing a system update drop readahead file 2012-05-23 03:50:15 +02:00
Lennart Poettering d360705f0f system-update: add system update generator
http://freedesktop.org/wiki/Software/systemd/SystemUpdates
2012-05-22 19:48:51 +02:00
Lennart Poettering 6b1dc2bd3c mount: replace PID1 internal fstab parser with generator
Bit by bit we should remove non-unit parsing from PID 1 and move into
generators, to clean up our code base a bit and clearly separate
parsers.
2012-05-22 19:25:17 +02:00
Lennart Poettering 49e7f02774 rescue: don't pull in sockets
In rescue mode let's not establish all sockets, so that we don't end up
starting a lot of additional services automatically.

Instead of pulling in basic.target we now only pull in sysinit.target
which pulls in local-fs.target and swap.target. That way rescue mode has
all the really basic setup around, but normal services are not started
and not autostarted either.
2012-05-22 16:12:25 +02:00
Lennart Poettering 416693175b switch-root: move switch_root() call into its own .c file 2012-05-21 19:33:39 +02:00
Lennart Poettering 27b5482cc0 delta: add systemd-delta tool to find overriden configuration and unit files 2012-05-16 03:24:50 +02:00
Kay Sievers 20bbd54f60 udev: libudev - bump soname, remove deprecated functions, introduce symbol versions 2012-05-15 23:06:26 +02:00
Kay Sievers 0e483bf911 build-sys: fix distcheck 2012-05-15 14:52:53 +02:00
Lennart Poettering 6edd7d0a09 sleep: implement suspend/hibernate as first class targets 2012-05-08 13:54:23 +02:00
Kay Sievers 9eb977db5b util: split-out path-util.[ch] 2012-05-08 02:33:10 +02:00
Kay Sievers bbc98d3256 util: split-out hwclock.[ch] 2012-05-08 01:57:17 +02:00
Kay Sievers 2c21044f05 util: split-out conf-file.[ch] 2012-05-07 19:01:24 +02:00
Lennart Poettering eecd1362f7 logind: implement delay inhibitor locks in addition to block inhibitor locks
This is useful to allow applications to synchronously save data before
the system is suspended or shut down.
2012-05-05 00:36:08 +02:00
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