1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-28 11:55:23 +03:00
Commit Graph

8437 Commits

Author SHA1 Message Date
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
Michal Schmidt
d384c7a874 journal-file: fix mmap leak
https://bugzilla.redhat.com/show_bug.cgi?id=831132
2012-06-12 16:46:34 +02:00
Michal Schmidt
2154761fbb logind: fix check for multiple sessions
The "$action-multiple-sessions" polkit actions are defined as
"$action while other users are logged in". To me this implies that the
following sessions should not count:
 - greeter sessions
 - user sessions belonging to the same user as the one who's asking

Not sure how to treat class SESSION_LOCK_SCREEN. I never have these.
I just ignore every class that's not SESSION_USER.

https://bugzilla.redhat.com/show_bug.cgi?id=814424
2012-06-12 10:36:33 +02:00
Kay Sievers
4f5d327a49 udev: support "udevadm info /dev/sda; udevadm info /sys/class/block/sda" 2012-06-10 22:53:07 +02:00
Kay Sievers
94f7a71442 tmpfiles: fix error message 2012-06-10 19:31:39 +02:00
Kay Sievers
ca2e894bdb tmpfiles: print error if basename lookup fails; document it in manpage 2012-06-10 19:21:50 +02:00
Dave Reisner
9125670f9a tmpfiles: allow to specify basename only: systemd-tmpfiles <program.conf>
Allow passing of basename only, instead of the absolute path; letting
systemd-tmpfiles perform a path lookup for the proper fragment path in
the config directories.

This allows distributions to call: systemd-tmpfiles <program.conf> on
upgrade of a package, with respecting the possibly overriden (or even
masked) tmpfile.
2012-06-10 19:05:20 +02:00
Kay Sievers
0e25e94ea7 man: replace tabs with spaces 2012-06-10 18:32:11 +02:00
Kay Sievers
eb125fb693 update .gitignore 2012-06-10 18:28:53 +02:00
Kay Sievers
6110885c2c man: systemd-tmpfiles - document proper config-file-stack order 2012-06-10 18:26:11 +02:00
Tom Gundersen
4bf43a32a9 arch: drop sysvcompat support
Our downstream generator takes care of all the sysvcompat support we need.
2012-06-10 17:33:34 +02:00
Kay Sievers
8e8eb8fbaf udev: always use $(rootprefix)/lib/udev for libexecdir
On Sat, Jun 9, 2012 at 12:46 AM, Malte Starostik <lists@malte.homeip.net> wrote:
> From: Malte Starostik <m-starostik@versanet.de>
>
> Rules get installed in $(libexecdir)/udev/, so are keymaps.  Helper
> binaries go to $(rootprefix)/lib/udev though.  Problem is, in the code,
> both are referenced via UDEVLIBEXECDIR which is defined to the former
> location.  Result: systemd-udev can't find e.g. the keymap binary to
> apply keymaps.
2012-06-10 17:23:43 +02:00
Kay Sievers
7a5498fe92 systemd-debug-shell: add to POTFILES.skip 2012-06-07 19:34:57 +02:00
Kay Sievers
26cbf29c52 delete plymouth units; moved to plymouth 2012-06-07 19:27:17 +02:00
Michal Schmidt
ed061a8dc2 units: add systemd-debug-shell.service
If enabled, the service provides a root shell from an early boot. It also
remains active late into shutdown. It is useful for debugging startup and
shutdown problems.

This is the unit referenced in
http://freedesktop.org/wiki/Software/systemd/Debugging#early_debug_shell
2012-06-07 16:33:45 +02:00
Kay Sievers
a2368a3f37 udev: systemd-udev-settle.service fix After=
https://bugs.freedesktop.org/show_bug.cgi?id=50779
2012-06-06 14:30:16 +02:00
Michal Schmidt
3305d6806d units: avoid redundant VT clearing by agetty
TTYVTDisallocate=yes already clears the VT. agetty does not need to do
it again. Run it with --noclear.

Felix Miata found the double clearing confusing in this bugreport:
https://bugzilla.redhat.com/show_bug.cgi?id=828007
Add a comment explaining what clears the VT.
2012-06-06 11:33:18 +02:00
Auke Kok
cae544bcdb readahead: Add tool to analyze the contents of the pack file. v3.
This patch adds code to compile 'systemd-readahead-analyze' and install
it into $bindir.

Use this program to parse the contents of the readahead pack file, or
an arbitrary pack file and display which files are listed in it, and
how much of the files are requested to be readahead.

This code is not new - it's partially taken from sreadahead (formerly
maintained by Arjan van der Ven and me, and was originally written
by me), and adapted with the right bits to parse the systemd
readahead pack files, which are slightly different in format.

v2 adds a common READAHEAD_PACK_FILE_VERSION used in all the code
to provide a quick way to assure all these programs are always
synchronized. v3 fixes the integer math.
2012-06-05 22:45:37 +02:00
Kay Sievers
3cbd5f6be1 udev: remove remaining selinux labeling for file in /run 2012-06-05 17:31:32 +02:00
Kay Sievers
e6f86cac16 udev: kernel cmdline - accept rd.* parameters 2012-06-04 22:46:32 +02:00
Kay Sievers
f96096dbbf silence gcc warning on 32 bit 2012-06-04 22:27:39 +02:00
Kay Sievers
2d1972857b build-sys: release 185 2012-06-04 20:15:16 +02:00