1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 10:51:20 +03:00
Commit Graph

8458 Commits

Author SHA1 Message Date
Lennart Poettering
d081dffbd3 core: remove sysv_console option
This option never made much sense. It was originally intended to make
sure that the usual startup output of sysv scripts goes to the terminal.
However, since SysV scripts started from a terminal would not output to
that terminal, but rather /dev/console this effect was more often than
not actually taking place. Nowadays systemd has much nicer boot time
status output than SysV which makes the sysv output redundant. Finally,
all output of services goes to the journal anyway, and is not lost.

Hence, let's drop this option, and simplify things a bit.
2012-06-22 13:16:28 +02:00
Lennart Poettering
b0193f1c1f systemctl: automatically turn paths and unescaped unit names into proper unit names
This makes sure that

  systemctl status /home

is implicitly translated to:

  systemctl status /home.mount

Similar, /dev/foobar becomes dev-foobar.device.

Also, all characters that cannot be part of a unit name are implicitly
escaped.
2012-06-22 13:08:48 +02:00
Lennart Poettering
03658d4fd6 modules-load: parse driver=/rd.driver= kernel command line option
This generalizes logic that already has been available in dracut before.
2012-06-22 11:39:04 +02:00
Lennart Poettering
b79f817b1b man: refer to udevd by its service name not binary name
Since the binary name is now hidden away in /usr/lib/ the primary user
handle for the udev service is the unit name, hence change the man page
to be available under the unit name, and make the binary name an alias
for it.
2012-06-22 10:38:40 +02:00
Lennart Poettering
9473414219 fstab-generator: support fstab=/rd.fstab= kernel cmdline
This generalizes functionality already available in dracut.
2012-06-22 10:27:05 +02:00
Lennart Poettering
2488799b35 man: add more links to kernel-command-line(7) 2012-06-22 10:13:50 +02:00
Lennart Poettering
66a78c2b95 cryptsetup: allow configuration of LUKS disks via the kernel cmdline
This generalizes a bit of the functionality already available in dracut.
2012-06-22 10:11:06 +02:00
Lennart Poettering
601913d616 man: prettify logind man page 2012-06-22 01:47:43 +02:00
Lennart Poettering
ccb94c88fd man: minor typo fixes 2012-06-22 01:38:42 +02:00
Lennart Poettering
c66e7bc7a1 man: document all kernel command line options we understand 2012-06-22 01:35:52 +02:00
Lennart Poettering
8b38f3cc3e journal: fix sd_journal_stream_fd() 2012-06-22 00:19:13 +02:00
Eelco Dolstra
62bca2c657 journal: set the _SYSTEMD_UNIT field for messages from terminated processes
As described in

  https://bugs.freedesktop.org/show_bug.cgi?id=50184

the journal currently doesn't set fields such as _SYSTEMD_UNIT
properly for messages coming from processes that have already
terminated.  This means among other things that "systemctl status" may
not show some of the output of services that wrote messages just
before they exited.

This patch fixes this by having processes that log to the journal
write their unit identifier to journald when the connection to
/run/systemd/journal/stdout is opened.  Journald stores the unit ID
and uses it to fill in _SYSTEMD_UNIT when it cannot be obtained
normally (i.e. from the cgroup).  To prevent impersonating another
unit, this information is only used when the caller is root.

This doesn't fix the general problem of getting metadata about
messages from terminated processes (which requires some kernel
support), but it allows "systemctl status" and similar queries to do
the Right Thing for units that log via stdout/stderr.
2012-06-22 00:14:08 +02:00
Lennart Poettering
3b0810c53c readahead: minor code style fixes 2012-06-22 00:09:23 +02:00
Lennart Poettering
ebfb7506fe readahead: make sure to close pack file before exiting, to be valgrind clean 2012-06-22 00:03:25 +02:00
Lennart Poettering
97fa0e708f readahead: use log_error() for logging errors 2012-06-21 23:58:31 +02:00
Lennart Poettering
a0bbec1ab0 readahead: make use of util.h's page_size() call 2012-06-21 23:56:03 +02:00
Lennart Poettering
87ce22cc0d readahead: merge three binaries into one
since the binaries share much of the same code and we better load only
one binary instead of two from disk at early boot let's merge the three
readahead binaries into one. This also allows us to drop a lot of
duplicated code.
2012-06-21 23:53:20 +02:00
Lennart Poettering
b4bdfefac3 preset: don't look for preset files in /lib unless /usr is split off 2012-06-21 23:22:53 +02:00
Lennart Poettering
8a422bb295 man: document the new RPM macros in daemon(7) 2012-06-21 22:36:37 +02:00
Lennart Poettering
590f18a27c rpm: include RPM macro definition for .spec snippets
Let's try to standardize a bit the RPM macros used for
installing/uninstalling services.

This only covers the non-SysV compat bits, since that tends to vary
widely between the various distros.

Usage:

Add %{?systemd_requires} to the header of the spec file. And then:

%post
%systemd_post foobar.service

%preun
%systemd_preun foobar.service

%postun
%systemd_postun foobar.service

And, instead of the latter, in case the service shall be restarted on updates:

%postun
%systemd_postun_restart foobar.service
2012-06-21 22:14:17 +02:00
Lennart Poettering
20747498c6 login: wrap CanTTY and CanGraphical seat attributes in libsystemd-login 2012-06-21 16:52:54 +02:00
Lennart Poettering
7ea9cb9120 man: document new sd_session_get_state() call 2012-06-21 16:31:06 +02:00
Lennart Poettering
0604381b9d logind: introduce a state for session, being one of online, active, closing
online = logged in
active = logged in and session is in the fg
closing = nominally logged out but some left-over processes still around

Related to:

https://bugzilla.gnome.org/show_bug.cgi?id=677556
2012-06-21 16:14:53 +02:00
Lennart Poettering
f1a8e221ec logind: expose CanGraphical and CanTTY properties on seat objects
Since we boot so fast now that gdm might get started before the
graphics drivers are properly loaded and probed we might end up
announcing seat0 to gdm before it has graphics capabilities. Which will
cause gdm/X11 cause to fail later on.

To fix this race, let's expose CanGraphical and CanTTY fields on all
seats, which clarify whether a seat is suitable for gdm resp, suitable
for text logins. gdm then needs to watch CanGraphical and spawn X11 on
it only if it is true.

This way:

USB graphics seats will expose CanGraphical=yes, CanTTY=no

Machines with no graphics drivers at all, but a text console:
CanGraphical=no, CanTTY=yes

Machines with CONFIG_VT turned off: CanGraphical=yes, CanTTY=no

And the most important case: seat0 where the graphics driver has not
been probed yet boot up with CanGraphical=no, CanTTY=yes first, which
then changes to CanGraphical=yes as soon as the probing is complete.
2012-06-21 13:48:01 +02:00
Lennart Poettering
cd8e457c58 update TODO 2012-06-20 16:03:57 +02:00
Lennart Poettering
d139b24a80 update TODO 2012-06-20 14:31:00 +02:00
Lennart Poettering
24f3a374b9 tmpfiles: exclude the first level directories in /run/user from automatic clean up
It's logind's job to maintain those user dirs, so avoid automatic clean
up for them. However, we do cover everything within them.
2012-06-20 09:05:50 +02:00
Shawn Landden
e23637b649 analyze: Python 3 compatibility
Plot verb doesn't currently work b/c Cairo bug sending to stdout in python 3.
2012-06-19 19:47:43 +02:00
Lennart Poettering
2138e96918 login: initialize XDG_RUNTIME_DIR as /run/user/$UID instead of /run/user/$USER
The sssd folks would like to place the kerberos credential cache in
XDG_RUNTIME_DIR, but need to do that in the PAM auth hooks, before
pam_systemd is run as part of the PAM session setup. Hence, in order to
make this easy for them: avoid usage of usernames, and use user IDs
instead thus making an additional NSS lookup unnecessary in the kerberos
bits, but still have the directory well-defined so that the kerberos
bits can determine it before pam_systemd is run.
2012-06-19 17:29:22 +02:00
Tom Gundersen
d305a67b46 vconsole-setup: enable utf-8 mode explicitly
Rather than assuming the console is in utf-8 mode if nothing else is
specified, be a bit more robust and enable it explicitly.

This fixes a regression compared with Arch's initscripts when not
using a framebuffer as the old VGA console would not be in utf-8
mode by default.

Furthermore, this would allow vconsole-setup to be used after boot
to change the vconsole into utf-8 mode in case it has been set to
non-utf-8 mode for whatever reason. I.e, the following would leave
the console in utf-8 mode as expected:

 # export LANG=en_US.ISO-8859-1
 # /usr/lib/systemd/systemd-vconsole-setup
 # export LANG=en_US.UTF-8
 # /usr/lib/systemd/systemd-vconsole-setup

Reported-by: Xyne <xyne@archlinx.ca>
Reported-by: Thomas Bächler <thomas@archlinux.org>
Cc: Dave Reisner <dreisner@archlinux.org>
2012-06-19 17:29:22 +02:00
Michal Sekletar
9722ef2565 systemd: return error when asked to stop unknown unit
Command systemctl stop foo.service, will print error message, when
foo.service is unknown to systemd, i.e. there is no unit file loaded for
this service.
https://bugzilla.redhat.com/show_bug.cgi?id=732874
2012-06-19 11:38:22 +02:00
Kay Sievers
b30b426025 libudev: clarify that udev_monitor_receive_device() is non-blocking
Based on a patch from: Sam Thursfield <ssssam@gmail.com>
https://bugs.freedesktop.org/show_bug.cgi?id=51202
2012-06-18 15:58:44 +02:00
Lennart Poettering
10b6f904cc journal: fix monotonic seeking 2012-06-17 00:03:13 +02:00
Lennart Poettering
ba6b303953 journal: rotate on SIGUSR2 2012-06-17 00:03:12 +02:00
Lennart Poettering
38a6db16dc journal: fix SD_JOURNAL_SYSTEM_ONLY flag 2012-06-17 00:03:12 +02:00
Lennart Poettering
089842938d journal: expose and make use of cutoff times of journal
This helps explaining when the log output of "systemctl status" is
incomplete because the logs got rotated since the service was started.
2012-06-17 00:03:12 +02:00
Lennart Poettering
8db4213e7b journal: correct list link up on hash collisions 2012-06-17 00:03:12 +02:00
Lennart Poettering
8144056fa6 journal: add basic object definition for signatures 2012-06-17 00:03:12 +02:00
Lennart Poettering
23b0b2b264 journal: replace arena offset by header size 2012-06-17 00:03:11 +02:00
Michal Schmidt
cdc564d27f logind: more robust handling of VT-less systems
Restore the check that was removed in commit 74afee9c. Its removal
caused a regression on some s390x systems where for whatever reason the
device node /dev/tty0 exists and makes the preceding access() check
pass.
2012-06-15 22:34:34 +02:00
Lukas Nykryn
98709151f3 service: timeout for oneshot services
Add possibility to specify timeout for oneshot services.

[ https://bugzilla.redhat.com/show_bug.cgi?id=761656
  Added minor fixups. -- michich ]
2012-06-15 16:04:06 +02:00
Michal Schmidt
34cdc274ed systemctl: clearer error message for missing install information
Some users found it difficult to understand what systemctl was telling
them.
Instead of "install information" talk about "[Install] section", which
is more likely to ring a bell. And suggest that it is intentional, so
that users do not attempt to "correct" the unit files.

https://bugzilla.redhat.com/show_bug.cgi?id=817033
2012-06-14 23:35:56 +02:00
Michal Schmidt
e7aee75932 tmpfiles: create char devices with correct SELinux context
https://bugzilla.redhat.com/show_bug.cgi?id=824059
2012-06-14 16:01:19 +02:00
Michal Schmidt
48899192a7 unit-name: introduce unit_dbus_path_from_name()
Use the same function in core and in systemctl.
get_unit_path() in systemctl becomes unnecessary.
2012-06-13 18:42:02 +02:00
Michal Schmidt
1c291cf34c systemctl: warn about all active triggers, not just sockets 2012-06-13 18:42:02 +02:00
Michal Schmidt
222d0348f9 systemctl: fix iteration in check_listening_sockets() 2012-06-13 18:42:02 +02:00
Michal Schmidt
31be1221a1 systemctl: remove is_socket_listening
We can use the functionality of check_unit(). Factor out
check_one_unit().
2012-06-13 18:42:01 +02:00
Michal Schmidt
e61a3135e9 systemctl: style fixes for the previous patch
Use the usual indentation, bracketing style, and no assignments in ifs.
Since check_listening_sockets provides just optional hints for the user,
don't pass its DBusErrors to the caller.
2012-06-13 18:42:01 +02:00
Michal Sekletar
701cdcb9ee systemctl will print warning when stopping unit
systemctl now prints warning and list of sockets in listenning state which can
trigger start of service which is about to be stopped
2012-06-13 18:42:01 +02:00
Michal Schmidt
68afbe5f0d man: fix 'sysytemd' typos 2012-06-13 00:09:25 +02:00