Commit graph

10495 commits

Author SHA1 Message Date
Kay Sievers 3f60bcb5e6 udev: firmware - do not created /run/udev/firmware-missing/
The userspace firmware loader is deprecated now, and will be entirely
removed when we depend on a kernel version with the built-in firmware
loader available.
2013-03-03 18:31:52 +01:00
Zbigniew Jędrzejewski-Szmek d288f79fb4 journald: do not barf when setting RateLimitInterval=0
Assertion 'interval > 0 || burst == 0' failed at src/journal/journald-rate-limit.c:78, function journal_rate_limit_new(). Aborting.
2013-03-03 09:11:28 -05:00
Zbigniew Jędrzejewski-Szmek 117dcc5793 core/service: use cleanup functions, wrap lines 2013-03-03 09:11:22 -05:00
Zbigniew Jędrzejewski-Szmek 28a79bd28b core/path: catch errors when adding watches
Errors because of oom conditions or descriptor exhaustion should not
be ignored. We probably cannot recover from those conditions.

Current behaviour wrt. insufficient permissions is described in the
man page. It might make sense in case of user sessions, so I left
it as is.
2013-03-03 08:55:53 -05:00
Zbigniew Jędrzejewski-Szmek e0207c8d91 core/path: modernize style 2013-03-03 08:55:53 -05:00
Zbigniew Jędrzejewski-Szmek a163db4419 core/path: use automatic cleanup
... and fix bogus return code on malloc failure.
2013-03-03 08:55:53 -05:00
Zbigniew Jędrzejewski-Szmek f8c16f42fb core/path: fix a leak in success path
... and use automatic cleanup.
2013-03-03 08:55:53 -05:00
Michael Biebl b8fe3faf9f Update TODO 2013-03-03 14:40:49 +01:00
Michael Biebl d611dadcc7 bash-completion: split completions and move to new location
Split the large bash completion script into separate, smaller files each
named after the binary it is used for and move the files to
/usr/share/bash-completion/completions. This way the completions can be
loaded on demand and we only install the completions for the tools we
actually build. The old path /etc/bash_completion.d/ is deprecated and
will disappear in the future.
2013-03-03 14:39:51 +01:00
Michal Schmidt 076a24adf4 job: print the "OK" status messages in normal green
The "OK" status messages should not draw attention to themselves.
It's better if they're not printed in bright/bold. Leave that
to errors and warnings.

Use a plain inconspicuous enterprisey green.
2013-03-02 17:56:32 +01:00
Michal Schmidt e970a72e94 manager: turn a superfluous check into assert
The crash that the check prevented has been fixed by commit 9e9e2b7.
2013-03-02 12:57:42 +01:00
Michal Schmidt 6b19ad24d3 unit: count deserialized job only after it's definitely installed
Installation of a deserialized job may fail (though purely in theory),
so increase the running job counter only when succeeding.
2013-03-02 12:29:04 +01:00
Tom Gundersen cf84347794 initrd: add unit files needed for basic systemd-in-initrd support
This will:
 * mount all configured filesystems (typically the rootfs on /sysroot)
 * reload the configuration to pick up anything from the mounted fs (typically
   /sysroot/etc/fstab)
 * mount any newly configured filesystems (typically /usr on /sysroot/usr, if
   applicable)
 * shut-down and clean-up any daemons running in the initramfs (typically udevd)
 * switch-root to /sysroot and start the real init

For an example of what files should be included in an initramfs based on this
see
<https://mailman.archlinux.org/pipermail/arch-projects/2013-February/003628.html>.

Cc: Harald Hoyer <harald.hoyer@gmail.com>
Cc: Dave Reisner <d@falconindy.com>
2013-03-01 22:52:36 +01:00
Tom Gundersen 3d22d1ab57 fstab-generator: initrd - mount selected entries from /sysroot/etc/fstab
We only mount "/usr" and entries marked with "x-initrd.mount".

This (together with the right unit files) is needed in the initramfs in order to
natively support mounting /usr (and friends) from the initramfs.

The way it is meant to work is:
 * wait for sysroot.mount to be mounted
 * do a daemon-reload to generate sysroot-usr.mount (++) from /sysroot/etc/fstab
 * wait for sysroot-usr.mount to be mounted
 * switch-root

Cc: Harald Hoyer <harald.hoyer@gmail.com>
Cc: Dave Reisner <d@falconindy.com>
2013-03-01 22:52:36 +01:00
Lukas Nykryn fea9740ae4 systemctl: check if iterator was initialized succesfully 2013-03-01 16:43:57 -05:00
Lukas Nykryn 34bf02818d manager: print p and then free it 2013-03-01 16:43:57 -05:00
Lukas Nykryn 4534824035 systemd-analyze: free unit_times only if it is not NULL 2013-03-01 16:43:57 -05:00
Lukas Nykryn 684ecf306a systemd-python: add missing check for return of PyDict_SetItem in _reader.c 2013-03-01 16:43:57 -05:00
Tom Gundersen 533740e161 fstab-generator: drop rootwait support
I originally added this to stay as compatible as possible with the kernel, but
as Lennart argued it is not really useful in the initramfs, so let's drop it (we
already don't support 'rootdealy').
2013-03-01 21:17:19 +01:00
Lennart Poettering 9058482225 update TODO 2013-03-01 19:22:30 +01:00
Mantas Mikulėnas 41330ddb03 inhibit: make the output more readable
The columnar output can become pretty horrible. When GNOME inhibits
power/suspend/hibernate keys, the "WHAT" column's text extends to "WHO"
and even "WHY". At the same time, all texts in "WHY" are of the form

    GNOME handlin...sses
    Receiving sle...ions
    GNOME needs t...reen

This patch splits each inhibit entry into four lines, allowing the full
text to fit in a normal-width terminal.
2013-03-01 19:22:30 +01:00
Lennart Poettering 41be2ca14d coredump: bump coredump truncation size from 24M to 768M
In the long run we really should make this runtime configurable.
2013-03-01 19:22:30 +01:00
Michal Schmidt 9e9e2b722c core: fix running jobs counters after reload/reexec
All active units will call unit_notify() during coldplug, so we just
make sure we're counting from zero again and get the correct result for
n_on_console.

For n_running_jobs we likewise reset it to zero and then count
the running jobs as we encounter them in deserialization.
2013-03-01 18:38:22 +01:00
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