Commit graph

10572 commits

Author SHA1 Message Date
Harald Hoyer 945d1442ed fstab-generator: set "ro" as default for sysroot.mount 2013-03-01 17:52:05 +01:00
Harald Hoyer 3fb5a0feb4 fstab-generator: fix commit 92094b7 2013-03-01 17:07:44 +01:00
Oleksii Shevchuk bf6dcfa6a7 unit: fix the race in deserialization.
unit_notify is fired in deserelization code (particulary in
service_set_state). Units passed in random order, and there is possibility,
that unit with StopWhenUnneeded=yes passed before it actual dependecies. In
that case unit will be stopped as unneeded, because deps in UNIT_INACTIVE state
yet.

So, reuse similar logic (unit.c:1421) to avoid this race
2013-03-01 15:11:35 +01:00
Harald Hoyer 92094b75fb fstab-generator: parse_new_root_from_proc_cmdline() don't use "defaults"
Don't use "defaults" as default option string.

"defaults,<anyotheroption>" does not
even work for the mount unit mount options.
2013-03-01 15:05:28 +01:00
Harald Hoyer 5a82a91a99 manager: prevent segfault in manager_print_jobs_in_progress() 2013-03-01 15:05:28 +01:00
Harald Hoyer e2cb60fa97 cryptsetup-generator: fix the kernel command line strategy for luks.uuid
If rd.luks.uuid or luks.uuid is specified on the kernel command, only
generate units for these UUIDs. Additionally use the information in
/etc/crypttab unless rd.luks.crypttab=0 or luks.crypttab=0 is specified.
2013-03-01 15:05:28 +01:00
Lennart Poettering 487060c239 specifier: when resolving specifier strings when loading configuration, don't misunderstand parse failures as OOM
http://lists.freedesktop.org/archives/systemd-devel/2013-February/009179.html
2013-03-01 14:54:55 +01:00
Frederic Crozat 3f8ee79182 fstab,mount: detect rbind as bind mount
Correctly detect rbind mount option as bind mount.

Fixes https://bugzilla.novell.com/show_bug.cgi?id=804575.
2013-03-01 14:43:18 +01:00
Daniel Wallace ffa7cd15cd journalctl: add --user-unit= switch
Add --user-unit= to make it possible to query for user logs by the name
of the service.
2013-03-01 14:39:04 +01:00
Lennart Poettering 242c4e1cc4 path-lookup: downgrade again the messages where we log for units
This partially reverts 7ad94c716d.

After that commit commands such as "systemctl enable" and friends
printed the search path information multiple times in its output, which
is ugly.

If we want the search paths to be printed at a higher log level, then we
should do this in PID 1 only, i.e. split the printing out of the normal
path lookup logic and invoke that explicitly from PID 1 but not in the
auxiliary tools.
2013-03-01 14:07:20 +01:00
Lennart Poettering d6cb60c7a0 Revert "systemctl: try to reload daemon after enable/disable only when not running in a chroot"
This reverts commit 5522a1fa87.

I am an idiot, the chroot case was already filtered out, so no point in
checking this again.
2013-03-01 14:04:18 +01:00
Lennart Poettering 5522a1fa87 systemctl: try to reload daemon after enable/disable only when not running in a chroot
http://lists.freedesktop.org/archives/systemd-devel/2013-February/009208.html
2013-03-01 13:59:49 +01:00
Lukas Nykryn 82910f1358 pager: add K to less environment
Using less as a pager sometimes breaks terminal when output
is interrupted by ctrl-c.

Reproducer: run 'sudo journalctl' ctrl-c.

Thanks mbriza@redhat.com for the solution.
2013-03-01 13:51:43 +01:00
Lukas Nykryn d89d6c86d9 journalctl: add --reverse option to show the newest lines first 2013-03-01 12:51:24 +01:00
Zbigniew Jędrzejewski-Szmek 37d3ab1b7e Merge branch 'python-systemd-reader'
* python-systemd-reader:
  python-systemd: rename Journal to Reader
  build-sys: upload python documentation to freedesktop.org
  systemd-python: add Journal class for reading journal
  python: build html docs using sphinx
  journalct: also print Python code in --new-id
  python: utilize uuid.UUID in logging
  python: add systemd.id128 module
  ... and 34 other commits

In short: python module systemd.id128 is added, and existing
systemd.journal gains a new class systemd.journal.Reader, which can be
used to iterate over journal entries. Documentation is provided, and
accessible under e.g.
    pydoc3 systemd.journal.Reader
or
    firefox http://www.freedesktop.org/software/systemd/man/python-systemd/
2013-02-28 20:05:12 -05:00
Zbigniew Jędrzejewski-Szmek 7f41820b07 python-systemd: rename Journal to Reader
It seems inevitable that we'll also grow a writing interface,
and then it'll be cumbersome to have a "Journal" for reading,
and a "Writer" for writing.
2013-02-28 20:04:17 -05:00
Zbigniew Jędrzejewski-Szmek 86e3d32a1d systemd-python: return both parts of sd_journal_get_monotonic_usec
In Python 3, a named tuple is used. In Python 2, a simple
tuple is used. In either case, the pair is (timestamp, bootid).
2013-02-28 20:04:17 -05:00
Zbigniew Jędrzejewski-Szmek 6a6633a16a python-systemd: check all errors and use automatic cleanup
__REALTIME_TIMESTAMP and __MONOTONIC_TIMESTAMP return ints.
It doesn't make sense to convert to string, just to convert
back to a number later on.

Also try to follow systemd rules for indentation.
2013-02-28 20:04:17 -05:00
Zbigniew Jędrzejewski-Szmek d426d8c863 build-sys: upload python documentation to freedesktop.org 2013-02-28 20:04:17 -05:00
Zbigniew Jędrzejewski-Szmek 5c083fa815 systemd-python: hide ChainMap import 2013-02-28 20:04:17 -05:00
Zbigniew Jędrzejewski-Szmek df2795d9f9 systemd-python: document attributes
In id128 it would be better to add everything automatically, but
sphinx cannot do this right now.
2013-02-28 20:04:17 -05:00
Zbigniew Jędrzejewski-Szmek a244c095c2 systemd-python: use PyModule_AddObject in id128 2013-02-28 20:04:17 -05:00
Zbigniew Jędrzejewski-Szmek 603c0b7b14 build-sys: make sphinx support uncoditional
It needs to be invoked explicitly, so there's no need to check
explicitly.
2013-02-28 20:04:17 -05:00
Zbigniew Jędrzejewski-Szmek 2c07646764 systemd-python: polish the docstrings 2013-02-28 19:36:14 -05:00
Lennart Poettering 54c31a79f7 man: clarify systemctl --property= documentation a bit 2013-02-28 19:55:48 +01:00
Lennart Poettering 3cd170c33e update TODO 2013-02-28 13:48:53 +01:00
Zbigniew Jędrzejewski-Szmek 1446560f22 man: fix docbook in systemd-activate(8) 2013-02-27 22:38:26 -05:00
Zbigniew Jędrzejewski-Szmek 870c4365cf man: document systemd-nspawn behaviour with -b
Cf. cb96a2c69 and 1ddf879a.
2013-02-27 22:25:40 -05:00
Zbigniew Jędrzejewski-Szmek 2ca0435be9 systemd-activate: add a socket-activation test tool 2013-02-27 22:10:14 -05:00
Zbigniew Jędrzejewski-Szmek 5674767ec2 nspawn: environment would be truncated with TERM unset 2013-02-27 21:55:00 -05:00
Zbigniew Jędrzejewski-Szmek 699ad6c06c man: drop rhs parts in snippets in directive index
-       --exit-if-exists=file
+       --exit-if-exists=
etc.
2013-02-27 21:55:00 -05:00
Zbigniew Jędrzejewski-Szmek 185c3be03c build-sys: fix update-man-rules for vpath builds 2013-02-27 21:55:00 -05:00
Zbigniew Jędrzejewski-Szmek fcc43d0158 build-sys: tell Makefile.am to distribute kernel-install 2013-02-27 21:54:59 -05:00
Michal Schmidt 03b717a3c4 core/manager: print status messages about running jobs
Sometimes the boot gets stuck until a timeout hits. The usual timeouts
are on the order of minutes, so users may lose patience.

Print animated status messages telling the names of units with running
jobs to make it easy to see what systemd is waiting for.

The animation looks cooler with a shorter interval, but 1 s is OK and
should not be too hard on slow serial console users.
2013-02-28 02:24:02 +01:00
Michal Schmidt 7ed9f6cd78 core: count active units that may mind our printing to /dev/console 2013-02-28 02:24:01 +01:00
Michal Schmidt 6ac8fdc955 core/execute: determine if ExecContext may fiddle with /dev/console
There is some guesswork, but it should work satisfactorily for the
purpose of knowing when to suppress printing of status messages.
2013-02-28 02:23:57 +01:00
Michal Schmidt 3a1286b668 core/execute: add internal is_terminal_output()
Similar to already existing is_terminal_input().

Note that the only current user (connect_logger_as) is never called
for EXEC_OUTPUT_TTY, so it won't mind whether we accept it.
2013-02-28 02:23:53 +01:00
Michal Schmidt 21baf21ae5 util: split resolving of /dev/console into a new function 2013-02-28 02:23:53 +01:00
Michal Schmidt 546ac4f007 core/unit: use a temp variable for manager pointer in unit_notify() 2013-02-28 02:23:47 +01:00
Michal Schmidt 984a2be450 util, core: add support for ephemeral status lines
Ephemeral status lines do not end with a newline and they expect to be
overwritten by the next printed status line.
2013-02-28 02:23:27 +01:00
Michal Schmidt 297d0749dd core/transaction: replace a bare status_printf()
Like other status messages, this one too should not be printed
unconditionally, but it should take the manager state into account.
unit_status_printf() does that.
2013-02-28 02:23:22 +01:00
Michal Schmidt 49b1d37726 core: redefine unit_status_printf()
Take advantage of the fact that almost all callers want to pass unit
description as the last parameter. Those who don't can use the more
flexible manager_status_printf().
2013-02-28 02:23:21 +01:00
Michal Schmidt 6084e22e57 core/manager: make a couple of functions static
They're not used outside manager.c anymore.
2013-02-28 02:23:14 +01:00
Michal Schmidt 25cee55076 core: add manager_status_printf()
unit_status_printf() checks the state of the manager, not of the unit
as such. Move it to manager.c and rename it to manager_status_printf().

Temporarily keep unit_status_printf as a wrapper macro.
2013-02-28 00:14:40 +01:00
Michal Schmidt 637f8b8eb5 core: keep track of the number of JOB_RUNNING jobs 2013-02-27 23:45:12 +01:00
Lennart Poettering a330b376ba man: document the new systemctl cgroup commands 2013-02-27 19:37:04 +01:00
Lennart Poettering 1f4cadad8b systemctl: fix minimal number of params for new cgroup commands 2013-02-27 18:58:56 +01:00
Lennart Poettering f0c15f2885 update TODO 2013-02-27 18:56:25 +01:00
Lennart Poettering 26d04f86a3 unit: rework resource management API
This introduces a new static list of known attributes and their special
semantics. This means that cgroup attribute values can now be
automatically translated from user to kernel notation for command line
set settings, too.

This also adds proper support for multi-line attributes.
2013-02-27 18:50:41 +01:00
Lennart Poettering 416389f7ae systemctl: fix indentation 2013-02-27 15:01:06 +01:00