1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-08 11:27:32 +03:00
Commit Graph

2063 Commits

Author SHA1 Message Date
Lennart Poettering
4099a281bb util: fix handling of empty files in read_one_line_file()
https://bugs.freedesktop.org/show_bug.cgi?id=45362
2012-02-11 00:27:12 +01:00
Lennart Poettering
89f134406a logind: introduce CanReboot/CanPowerOff bus calls 2012-02-11 00:13:10 +01:00
Michal Schmidt
5c72face73 cgroup: fix inverted condition
A bug was introduced in acb14d3 "cgroup: when getting cgroup empty
notifications, always search up the tree".

When the given cgroup is found the hashmap, we should be happy and
return it, not go looking up the tree for another one.

Fixes the hanging NetworkManager on shutdown for me.
2012-02-10 02:57:45 +01:00
Lennart Poettering
1b73da108b logind: make seat device management accessible to normal users/via polkit 2012-02-10 02:35:48 +01:00
Benjamin Franzke
80df5f4c3b logind: Allow PowerOff/Reboot in default context 2012-02-10 02:33:41 +01:00
Lennart Poettering
02c4ef9c35 service: imply NotifyAccess=main if WatchdogSec= is used 2012-02-09 21:11:25 +01:00
Michael Olbrich
4b9397474f service: add StartLimitInterval/StartLimitBurst/StartLimitAction 2012-02-09 21:01:29 +01:00
Michal Schmidt
81006b8ad8 install: fix incorrect 'Access denied' message with a non-existent unit
With "systemctl is-enabled non-existent.service"
_UNIT_FILE_STATE_INVALID (-1) was wrongly interpreted as -errno.
Return -ENOENT in this case.

https://bugzilla.redhat.com/show_bug.cgi?id=766579
2012-02-09 10:36:56 +01:00
Michal Schmidt
ab5919fa1a systemctl: check for no more work after chkconfig
Avoid a bogus message from 'systemctl enable ...' when all units given
are SysV services:
   Warning: unit files do not carry install information. No operation
   executed.

https://bugzilla.redhat.com/show_bug.cgi?id=787407
2012-02-09 10:05:15 +01:00
Lennart Poettering
353e12c2f4 service: ignore SIGPIPE by default 2012-02-09 03:18:04 +01:00
Dave Reisner
cea6691857 modules-load: resolve aliases before insert modules
This keeps behavior in line calling /sbin/modprobe -- aliases will be
resolved to the relevant modules, and errors from inserting modules
which are already loaded are ignored.
2012-02-09 01:44:54 +01:00
Lennart Poettering
cdb454f2de kmod: make GCC shut up 2012-02-09 01:24:40 +01:00
Tom Gundersen
83684a3553 modules-load: use libkmod rather than modprobe 2012-02-09 00:47:09 +01:00
Tom Gundersen
728beb28a7 kmod-setup: use libkmod rather than modprobe 2012-02-09 00:43:05 +01:00
Lennart Poettering
cafac610a7 ratelimit: if interval/burst are set to 0, assume ratelimiting shall be disabled 2012-02-08 21:35:49 +01:00
Michael Olbrich
6e0bcc980b service: set WATCHDOG_USEC environmen variable 2012-02-08 17:11:06 +01:00
Michael Olbrich
bb242b7b52 service: introduce WatchdogSec and hook up the watchdog with the existing failure logic 2012-02-08 17:10:38 +01:00
William Douglas
9e7c53579a systemd: Add systemd.setenv for /proc/cmdline parsing.
Check for systemd.setenv when parsing /proc/cmdline.
ex: systemd.setenv=PATH=/opt/bin
2012-02-08 16:33:55 +01:00
Benjamin Franzke
1d4ec31570 logind: Terminate bus_login_session_user_properties
Fixes segfault in systemd-logind, triggered by:
systemd-loginctl show-session $XDG_SESSION_ID.

Bug introduced by d200735e13,
so only systemd v39 is affected.
2012-02-07 23:52:58 +01:00
Lennart Poettering
cae5846b2c logind: fix introspection data 2012-02-07 20:12:21 +01:00
Lennart Poettering
84c3361e12 logind: introduce ActivateSessionOnSeat() 2012-02-07 20:12:13 +01:00
Lennart Poettering
acdfc041cc ratelimit: fix macro definition 2012-02-07 15:56:53 +01:00
Lennart Poettering
2c6db6fb9b main: use a shorter default $PATH if /usr is merged 2012-02-07 15:56:28 +01:00
Michal Schmidt
db1355b1c1 mount: adjust dependencies for remote filesystems
Currently remote mounts automatically get:
 After=remote-fs-pre.target network.target

remote-fs-pre.target is already After=network.target. Just make sure
remote-fs-pre.target is pulled in by remote-fs.target if any remote
filesystems are configured.
For the mount units it is then sufficient to get:
 After=remote-fs-pre.target

Later NetworkManager will hook its NM-wait-online.service into
remote-fs-pre.target.wants in order to remove the need for the administrator
to enable the service manually when he has any remote filesystems.

https://bugzilla.redhat.com/show_bug.cgi?id=787314
2012-02-07 11:22:48 +01:00
Lennart Poettering
acb14d318b cgroup: when getting cgroup empty notifications, always search up the tree 2012-02-03 05:25:31 +01:00
Lennart Poettering
cd43ca73e1 path: convert failure field to enum 2012-02-03 05:06:04 +01:00
Lennart Poettering
e1770af812 swap: replace failure boolean by result enum 2012-02-03 05:06:04 +01:00
Lennart Poettering
067d72c9fe timer: convert failure bool into enum 2012-02-03 05:06:04 +01:00
Lennart Poettering
81a5c6d03e automount: convert failure boolean to enum 2012-02-03 05:06:04 +01:00
Lennart Poettering
9d2f51788e mount: replace failure boolean by enum 2012-02-03 05:06:03 +01:00
Lennart Poettering
cfc4eb4cba socket: replace failure boolean by enum 2012-02-03 05:06:03 +01:00
Lennart Poettering
f42806df7d service: replace "failure" boolean by enum, and export it
This should give admins more useful hints why a service failed.
2012-02-03 05:06:03 +01:00
Chris Paulson-Ellis
ec3f9b53f8 util: prevent daemon-reload from reaping service processes.
The reaping of generator processes run as part of a daemon-reload should not
call waitid(PID_ALL). The waitid() call in execute_directory() is intended only
to reap the executed processes, but if a service process exits at about the
same time as a daemon-reload, then that service process is reaped as well,
preventing it from being reaped in the proper place in
manager_dispatch_sigchld().

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=43625
2012-02-02 19:11:16 +01:00
Alvaro Soliverez
ce09557917 sd-daemon: support for building sd-daemon.c with Bionic (Android)
sd-daemon.h is a drop-in file, so we should make sure it doesn't break
builds for anybody.

https://bugs.freedesktop.org/show_bug.cgi?id=42675
2012-02-02 19:11:16 +01:00
Michal Schmidt
bacbccb78c manager: tell correctly if the manager is booting
The assumption that the initial job is the job with id==1 is incorrect.
Some jobs may be enqueued before the job that starts the default unit as
in this example:

 -.mount changed dead -> mounted
 Trying to enqueue job quotacheck.service/start/fail
 Installed new job quotacheck.service/start as 1
 Installed new job systemd-stdout-syslog-bridge.socket/start as 2
 Enqueued job quotacheck.service/start as 1
 Trying to enqueue job quotaon.service/start/fail
 Installed new job quotaon.service/start as 5
 Enqueued job quotaon.service/start as 5
 Activating default unit: default.target
 Trying to enqueue job graphical.target/start/replace

This fixes a bug where displaying of boot status messages was turned off
too early.
2012-02-02 13:39:15 +01:00
Lennart Poettering
803a3464ce coredump: avoid coredump loops, divert coredump if journald itself is crashing 2012-02-02 01:22:49 +01:00
Lennart Poettering
5d6b158473 exec: include path name of binary we are about to execute when renaming forked off processes
Immediately after forking off a process change the comm name and argv[0]
to "(foobar)" where "foobar" is the basename of the path we are about to
execute.

This should be useful when charting boot progress.
2012-02-01 22:33:15 +01:00
Michael Olbrich
a6927d7ffc service: add watchdog timestamp
This patch adds WatchdogTimestamp[Monotonic] to the systemd service
D-Bus API. The timestamp is updated to the current time when the
service calls 'sd_nofity("WATCHDOG=1\n")'.
Using a timestamp instead of an 'alive' flag has two advantages:
1. No timeout is needed to define when a service is no longer alive.
   This simplifies both configuration (no timeout value) and
   implementation (no timeout event).
2. It is more robust. A 'dead' service might not be detected should
    systemd 'forget' to reset an 'alive' flag. It is much less likely
    to get a valid new timestamp if a service died.
2012-02-01 19:29:19 +01:00
Lennart Poettering
c4aa65e714 logind: add GetSessionByPID() bus call 2012-02-01 19:04:54 +01:00
Michal Schmidt
ede3deb425 socket: typo in dump output 2012-02-01 00:00:34 +01:00
Lennart Poettering
9b221b63e5 logind: if we have to stop a session, kill at least its leader 2012-01-31 23:51:39 +01:00
Lennart Poettering
9ba1a15985 load-fragment: properly parse size values denoted in bytes 2012-01-31 20:53:34 +01:00
Lennart Poettering
be19b7df6e journal: increase compression threshold for objects from 64 to 512
Apparently the perfomance price for compression is to steep to apply it
for all objects >= 64 and < 512 in size, as measured by Arjan Van De
Ven, hence increase the threshold to 512 which yields better results.
2012-01-31 20:38:53 +01:00
Ray Strode
8906b207d1 login: lock down input devices on extra seats
We need to tell the X server to grab the keyboards
and mice associated with a hotplugged seat, so that
it doesn't have the ability to control the kernel
vt consoles.
2012-01-31 20:00:36 +01:00
Kay Sievers
4f552cc7a0 pkg-config: rootlibexecdir -> systemdutildir
Better don't export historic names for split / vs. /usr filesysystems.
2012-01-30 16:32:18 +01:00
Michal Schmidt
512947d46f main: don't force text mode in console_setup()
When systemd starts, plymouth may be already displaying progress
graphically. Do not switch the console to text mode at that time.
All other users of reset_terminal_fd() do the switch as before.

This avoids a graphical glitch with plymouth, especially visible with
vesafb, but could be also seen as a sub-second blink with radeon.

https://bugzilla.redhat.com/show_bug.cgi?id=785548
2012-01-29 21:55:51 +01:00
Lennart Poettering
02b16a19a4 logind: make sure we create /var/lib/systemd before using it 2012-01-27 20:48:28 +01:00
Lennart Poettering
ab8da6c266 pkg-config: export libexecdir, so that that gdm can use it to find the x server wrapper 2012-01-27 19:06:34 +01:00
Lennart Poettering
7d9eaa8461 socket: if SO_RCVBUFFORCE fails, fall back to SO_RCVBUF, to have at least a little effect 2012-01-27 18:58:02 +01:00
Lennart Poettering
bb99a35a87 log: increase socket buffers for logging by default 2012-01-27 18:57:37 +01:00