1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 15:21:37 +03:00
Commit Graph

10713 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
4c42e8e161 man/service: document behaviour on failure
https://bugs.freedesktop.org/show_bug.cgi?id=38355
2013-03-19 22:15:01 -04:00
Zbigniew Jędrzejewski-Szmek
9d83ad481b catalog: remove broken links to wiki
https://bugs.freedesktop.org/show_bug.cgi?id=58359
2013-03-19 21:50:43 -04:00
Zbigniew Jędrzejewski-Szmek
54b7254c1f journalct: beef up entry listing
The ability to dump catalog entries in full and by id is added.
2013-03-19 21:50:43 -04:00
Zbigniew Jędrzejewski-Szmek
ab3a162c01 systemd-python: small cleanups
- separate methods with two empty lines for clarity
- avoid malloc(0) by specyfing private data size as -1
- add method name in error messages
2013-03-19 21:50:43 -04:00
Zbigniew Jędrzejewski-Szmek
2b01924cda systemd-python: add journal.get_catalog()
This one wraps sd_journal_get_catalog_from_message_id.
Thanks to Python namespacing, we can stick to a shorter name.
2013-03-19 21:50:42 -04:00
Zbigniew Jędrzejewski-Szmek
6808412dad systemd-python: add _Reader.get_catalog()
This one wraps sd_journaal_get_catalog.
2013-03-19 21:50:42 -04:00
Zbigniew Jędrzejewski-Szmek
0d1aaec228 man/catalog: fix synopsis and remind to free 2013-03-19 21:50:42 -04:00
Zbigniew Jędrzejewski-Szmek
6531dac67c systemd-python: add _Reader.closed attribute
This should make the file interface of _Reader complete.
2013-03-19 21:50:42 -04:00
Zbigniew Jędrzejewski-Szmek
52aeb63cff journalctl: use _cleanup_ in one function 2013-03-19 21:50:42 -04:00
Kay Sievers
bbb7f2ae50 rules: move builtin calls before the permissions section
<heftig> kay: systemd commit 22582bb broke cups usb printing for me
<heftig> because the "lp" group isn't applied anymore
<heftig> SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", GROUP="lp"
<heftig> moving this line to the end of 50-udev-default.rules restores correct behavior, as it's after usb_id
2013-03-20 01:30:34 +01:00
Harald Hoyer
1535fb7379 shell-completion/bash/journalctl: suppress stderr 2013-03-19 15:04:02 +01:00
Ozan Çağlayan
278e73d6b7 keymap: Remap microphone mute and touchpad toggle for Lenovo U300s
Separate out Ideapad U300s to its own line and add Microphone mute key.

Signed-off-by: Martin Pitt <martinpitt@gnome.org>
2013-03-19 14:55:32 +01:00
Martin Pitt
1563c0c35a keymaps: Use F20 for micmute keys to be friendly to X.org
The "micmute" key code is outside of X.org's allowed range [1].
gnome-settings-daemon interprets F20 as "microphone mute" these days [2], so
use this until X.org either gets fixed or obsoleted.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=692071
[2] https://mail.gnome.org/archives/commits-list/2013-January/msg05822.html
2013-03-19 13:12:00 +01:00
Ozan Çağlayan
785af213b6 keymap: Fix touchpad toggling on Lenovo IdeaPad U300s
IdeaPad U300s needs mapping 0xf1 to f21 just like Lenovo V480.

Signed-off-by: Martin Pitt <martinpitt@gnome.org>
2013-03-19 11:28:09 +01:00
Zbigniew Jędrzejewski-Szmek
4654e558a3 logind: exploit previous cleanups and simplify returns 2013-03-18 20:58:39 -04:00
Colin Walters
ce0fc5f5f6 logind: Make more use of cleanup macros 2013-03-18 19:59:33 -04:00
Colin Walters
c6a818c820 Use bus_maybe_send_reply() where applicable
This is a followup to: commit 1a37b9b904

It will fix denial messages from dbus-daemon between gdm and
systemd-logind on logging into GNOME due to this.

See the previous commit for more details.
2013-03-18 19:59:32 -04:00
Zbigniew Jędrzejewski-Szmek
8cb17a6dc8 sd-journal: do not require path to be absolute
Seems natural to be able to specify relative directory,
e.g. with journalctl -D. And even if, this should be checked
in front-end code, not in the library.
2013-03-18 19:49:33 -04:00
Zbigniew Jędrzejewski-Szmek
763c7aa288 journal,shared: add _cleanup_journal_close_ 2013-03-18 19:49:30 -04:00
Zbigniew Jędrzejewski-Szmek
a50d7d4389 journal: use _cleanup_
One log_debug() moved to match order in other functions.
2013-03-18 18:53:59 -04:00
Zbigniew Jędrzejewski-Szmek
6180fc611b journal: use sd_journal_close on error in sd_journal_new 2013-03-18 18:53:59 -04:00
Zbigniew Jędrzejewski-Szmek
85b2850ba9 systemd-python: allow Reader to be used as a context manager 2013-03-18 18:53:58 -04:00
Daniel Buch
4c325b2efe test-strv.c: test STRV_FOREACH_PAIR macro 2013-03-18 21:09:02 +01:00
Kay Sievers
5a33334b8a udev: rename kernel command line option to net.ifnames= 2013-03-18 19:31:34 +01:00
Tom Gundersen
08cbc57e87 man: udev - clarify when RUN is executed
Unlike IMPORT and PROGRAM, RUN is not executed inline, but after all the rules of the given event have been processed.
2013-03-18 18:28:59 +01:00
Tom Gundersen
f4fbb8be14 udev: builtin - use RUN rather than IMPORT for loading modules
The 'kmod' builtin, like the 'firmware' and 'uaccess' builtins, does not set
any variables, so don't use IMPORT.

Notice that this changes the behaviour slightly: the processing of subsequent
rules for the event that loads a module will no longer wait for the module
loading to finish. This is not expected to cause any problems, but we should
keep an eye on it.
2013-03-18 18:28:59 +01:00
Tom Gundersen
0cf2d0d023 udev: net-name-slot - disable by kernel command line switch
The properties will still be set in the udev database, but they will not be used
for setting the interface names. As for the other kernel commandline switches,
we allow it to be prefixed by 'rd.' to only apply in the initrd.
2013-03-18 18:28:59 +01:00
Tom Gundersen
6ec0ac43bb man: udev - move documentation of configuration file
Moved from udev(7) to systemd-udevd.service(8), where the rest of the
documentation of the configuration of the daemon lives.
2013-03-18 16:02:42 +01:00
Kay Sievers
61e536e1b7 udev: ifdef all firmware special handling 2013-03-18 15:22:32 +01:00
Tom Gundersen
a3bd8447be udev: make firmware loading optional and disable by default
Distros that whish to support old kernels should set
  --with-firmware-dirs="/usr/lib/firmware/updates:/usr/lib/firmware"
to retain the old behaviour.
2013-03-18 15:19:51 +01:00
Tom Gundersen
72c6cf8fa5 man: udev - document 'builtin'
The new IMPORT{builtin} and RUN{builtin} were not documented. Also make it clear
that RUN= is really an alias for RUN{program}=.
2013-03-18 14:55:59 +01:00
Kay Sievers
93f04c80f6 units: initrd, multi-user - add a few more words to Description= 2013-03-16 16:29:29 +01:00
Kay Sievers
0a2cdb3aee man: bootup - intrd-fs.target --> initrd.target 2013-03-16 16:21:47 +01:00
Kay Sievers
83d7d83bcc journal: pass the *pid* to sd_pid_get_owner_uid() 2013-03-16 16:10:22 +01:00
Zbigniew Jędrzejewski-Szmek
1a512bf48c timer: fix grammar in message 2013-03-15 22:56:40 -04:00
Michal Sekletar
c17ec25e4d core: reuse the same /tmp, /var/tmp and inaccessible dir
All Execs within the service, will get mounted the same
/tmp and /var/tmp directories, if service is configured with
PrivateTmp=yes. Temporary directories are cleaned up by service
itself in addition to systemd-tmpfiles. Directory which is mounted
as inaccessible is created at runtime in /run/systemd.
2013-03-15 22:56:40 -04:00
Josh Triplett
3b953d68c6 TODO: uses for SO_REUSEPORT
The new socket option SO_REUSEPORT would enable some new functionality;
add it to TODO.
2013-03-15 22:56:40 -04:00
Nathaniel Chen
abbacb1def smack-setup: enable Smack/CIPSO mapping
CIPSO is the Common IP Security Option, an IETF standard for setting
security levels for a process sending packets. In Smack kernels,
CIPSO headers are mapped to Smack labels automatically, but can be changed.

This patch writes label/category mappings from /etc/smack/cipso/ to
/sys/fs/smackfs/cipso2. The mapping format is "%s%4d%4d"["%4d"]...

For more information about Smack and CIPSO, see:
  https://kernel.org/doc/Documentation/security/Smack.txt
2013-03-15 22:56:40 -04:00
Zbigniew Jędrzejewski-Szmek
a4783bd17a smack-setup: extract rule writing into a separate function
Check all errors.
2013-03-15 22:56:40 -04:00
Umut Tezduyar
faeffa73a8 units: ignore systemd-sysctl on shutdown
No need to try to stop systemd-sysctl on shutdown as
this service doesn't have ExecStop= anyways.
2013-03-15 22:56:33 -04:00
Umut Tezduyar
89b1d5e0e4 core: keep mountinfo .mounts until late shutdown
.mount units coming from /proc/self/mountinfo file are
unmounted after local-fs.target is reached during shutdown.

Problem: .mount units popping up in mountinfo file are
added to systemd without any dependency. For that reason,
they are the first one to be unmounted during shutdown.
Whichever program mounted the file system deserves a
chance to also unmount it. This patch ensures that
/proc/self/mountinfo units will be unmounted after
local-fs.target during shutdown (if they haven't been
unmounted already)
2013-03-15 22:55:24 -04:00
Zbigniew Jędrzejewski-Szmek
df34f169b8 man: fix grammar 2013-03-15 22:55:24 -04:00
Zbigniew Jędrzejewski-Szmek
b04c8c83e8 systemd-python: add systemd.daemon wrapping sd-daemon
Please see the documentation (e.g. pydoc3 systemd.daemon) for full
description. As usual, systemd._daemon wraps the raw interface, while
systemd.daemon provides the more pythonic API. sd_listen_fds,
sd_booted, sd_is_fifo, sd_is_socket, sd_is_socket_unix,
sd_is_socket_inet, sd_is_mq, and SD_LISTEN_FDS_START are currently
wrapped.
2013-03-15 22:55:24 -04:00
Zbigniew Jędrzejewski-Szmek
5e65c93a43 systemd-activate: pass environment variables through
I need this to test half-installed socket-activated python
script, which requires PYTHONPATH and LD_LIBRARY_PATH set.
I assume that other people might find it useful to.

-E VAR passes through VAR from the environment, while
-E VAR=value sets VAR=value.

systemd-activate -E PYTHONPATH=/var/tmp/inst1/usr/lib64/python3.3/site-packages -E LD_LIBRARY_PATH=/var/tmp/inst1/usr/lib -l 2000 python3 -c 'from systemd.daemon import listen_fds; print(listen_fds())'
2013-03-15 22:55:24 -04:00
Kay Sievers
0f59fe5171 sysctl: default - add safe sysrq options 2013-03-15 19:30:53 +01:00
Kay Sievers
7aaec603d9 TODO: update 2013-03-15 17:48:12 +01:00
Lennart Poettering
9d60cb63d6 nspawn: don't make assumptions about the size of pid_t 2013-03-15 16:49:08 +01:00
Lennart Poettering
bb27ff6672 logind: explicitly create state directories during early initialization
Strictly speaking this isn't necessary for the /run/systemd/seats/
directory, since that is created anyway as the first seat is found, and
seat0 is always found. But let's be explicit here, and also create the
sessions/ and users/ directories, so that people can always install
inotify watches from very early on, even when nobody logged in yet.
2013-03-15 16:49:08 +01:00
Lennart Poettering
66e411811b sd-booted: update sd_booted() check a bit
Previously we were testing whether /sys/fs/cgroup/systemd/ was a mount
point. This might be problematic however, when the cgroup trees are bind
mounted into a container from the host (which should be absolutely
valid), which might create the impression that the container was running
systemd, but only the host actually is.

Replace this by a check for the existance of the directory
/run/systemd/system/, which should work unconditionally, since /run can
never be a bind mount but *must* be a tmpfs on systemd systems, which is
flushed at boots. This means that data in /run always reflects
information about the current boot, and only of the local container,
which makes it the perfect choice for a check like this.

(As side effect this is nice to Ubuntu people who now use logind with
the systemd cgroup hierarchy, where the old sd_booted() check misdetects
systemd, even though they still run legacy Upstart.)
2013-03-15 16:49:08 +01:00
Lennart Poettering
961e452692 strv: fix STRV_FOREACH_PAIR macro definition 2013-03-15 16:49:07 +01:00