Commit graph

20138 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek ea35a38613 hwdb: coalesce same pointingstick entries into one
Multiple models in the same hardware series are likely to have similar
specs. We should use organization similar to hwdb/60-evdev.
2015-04-28 08:52:17 -04:00
Hans de Goede 151f5feb31 udev: hwdb: Add trackpoint sensitivity settings for Lenovo X240 and 540p
Like the T440s these need the sensitity to be set significantly higher
then the default of 128 for the trackpoint to be usable. Like with the
T440s 200 seems to be a good value to get a reasonable but not too high
sensitivity.
2015-04-28 08:52:17 -04:00
Lennart Poettering 3d161f991e run: by default, wait until the transient unit finished start-up
Make this blocking behaviour optional with --no-block, similar to
systemctl's switch of this name.
2015-04-28 12:33:19 +02:00
Lennart Poettering de158ed22d run: synchronously wait until the scope unit we create is started
Otherwise it might happen that by the time PID 1 adds our process to the
scope unit the process might already have died, if the process is
short-running (such as an invocation to /bin/true).

https://bugs.freedesktop.org/show_bug.cgi?id=86520
2015-04-28 12:21:31 +02:00
Lennart Poettering dd305ec9c6 core: when we cannot add PID to a scope cgroup, log about it
Also, place the scope unit in failed state.
2015-04-28 12:20:57 +02:00
Lennart Poettering 373a99e489 bus-util: print correct warnings for units that fail but for which we have a NULL result only 2015-04-28 12:12:29 +02:00
Lennart Poettering a22e1850c3 man: clarify that only the first .network file with a matching [Match] matters
http://lists.freedesktop.org/archives/systemd-devel/2015-April/031294.html
2015-04-28 11:44:24 +02:00
Ivan Shapovalov 4370633083 core: coldplug all units which participate in jobs during coldplugging
This is yet another attempt to fix coldplugging order (more especially,
the problem which happens when one creates a job during coldplugging and
it references a not-yet-coldplugged unit).

Now we forcibly coldplug all units which participate in jobs. This
is a superset of previously implemented handling of the UNIT_TRIGGERS
dependencies, so that handling is removed.

http://lists.freedesktop.org/archives/systemd-devel/2015-April/031212.html
https://bugs.freedesktop.org/show_bug.cgi?id=88401 (once again)
2015-04-27 21:45:12 +02:00
Lennart Poettering 329c542585 update-done: ignore nanosecond file timestamp components, they are not reliable
https://bugs.freedesktop.org/show_bug.cgi?id=90192
2015-04-27 17:25:57 +02:00
Lennart Poettering 0a2f9085e2 update-done: minor simplification 2015-04-27 17:22:55 +02:00
Lennart Poettering d72bc59734 update TODO 2015-04-27 17:22:30 +02:00
Lennart Poettering 64b282ef71 man: document that nspawn's --bind= switch may be used multiple times 2015-04-27 15:40:30 +02:00
Thomas Hindoe Paaboel Andersen 8431778882 path-util: fix fstat fallback in fd_is_mount_point 2015-04-26 16:02:21 +02:00
Thomas Hindoe Paaboel Andersen 5921fc3cc3 sysv-generator: avoid freeing uninitialized variable
Would happen if lookup_paths_init returns an error.
2015-04-26 14:45:49 +02:00
Tom Gundersen 965288c5ee libudev: monitor - clarify log messages 2015-04-26 01:30:23 +02:00
Tom Gundersen 7141e4f62c sd-device: don't retry loading uevent/db files more than once
If for whatever reason there was nothing to load or loading failed, don't keep trying.
2015-04-26 01:30:23 +02:00
Tom Gundersen 2a2137401b sd-device: don't complain if the uevent file is missing
Only 'real' devices are required to have an uevent file.
2015-04-26 01:30:23 +02:00
Daniel Mack 5d236c1f42 bootchart: kill newline characters from log_error_errno() calls 2015-04-24 21:51:43 +02:00
Daniel Mack d3a2a05329 systemctl: kill newline characters from log_error_errno() calls
log_error_errno() already adds a newline, so drop them.
2015-04-24 21:50:36 +02:00
Daniel Mack c2a23db0b9 logind: kill newline characters from log_error_errno() calls
log_error_errno() already adds a newline, so drop them.
2015-04-24 21:44:51 +02:00
Tom Gundersen b66f29a1ea udevd: worker - log if worker result cannot be sent
If the main daemon is not notified about a worker finishing an event
the refcounting of the worker struct will be wrong, and we will lose
track of the number of children we have to wait for.

This should not happen, but if it does we better complain loudly about
it. Worst case udev will wait for 30 seconsd at shutdown waiting for
nonexistent workers.
2015-04-24 20:36:05 +02:00
Tom Gundersen c0bbfd72e7 udevd: worker - warn if unknown worker returns 2015-04-24 20:18:49 +02:00
Tom Gundersen 979558f322 udevd: worker - let the kernel attach the sender pid
No need to include this explicitly, just use SCM_CREDENTIALS.
2015-04-24 20:18:49 +02:00
Lennart Poettering 0f5a8be5fe sysctl: minor simplifications 2015-04-24 19:56:47 +02:00
Lennart Poettering e50b33bebd sysctl: don't propagate ENOENT sysctl options
We shouldn't fail the sysctl service if an option is missing.

Previously the warning about this was already downgraded to LOG_DEBUG,
but we really shouldn't propagate such errors either.
2015-04-24 19:56:47 +02:00
Lennart Poettering 742f41adb1 core: minor simplification 2015-04-24 19:56:47 +02:00
Lennart Poettering 07cc65c701 Update TODO 2015-04-24 19:56:47 +02:00
Lennart Poettering 4046d8361c man: extend documentation on IPForward= and IPMasquerade=
Mention the default values, and clarify how this relates to the
underlying sysctls.
2015-04-24 19:56:47 +02:00
Tom Gundersen e2f8d97a13 udevd: don't unref worker objects on SIGSTOP/SIGCONT
We should not be receiving these anyway, but let's be correct.
2015-04-24 19:13:48 +02:00
Tom Gundersen d1317d02e6 udevd: warn if we receive SIGCHLD from untracked worker 2015-04-24 19:13:48 +02:00
Tom Gundersen 70a93737ec udevd: improve logging in SIGCHLD handling
Remove some redundant logging, and reduce the log-level in most cases. The only
case that is really critical is if a worker failed while hanlding an event, so
keep that at error level.
2015-04-24 19:13:48 +02:00
Daniel Mack d71618654a sd-bus: teach bus_print_property() how to print SD_BUS_TYPE_INT64 2015-04-24 17:51:08 +02:00
Daniel Mack d6b07ef796 shutdownd: kill the old implementation
Not that all functionality has been ported over to logind, the old
implementation can be removed. There goes one of the oldest parts of
the systemd code base.
2015-04-24 17:48:12 +02:00
Daniel Mack f0efea232a systemctl: talk to logind for scheduled shutdowns
Drop the code which communicates with shutdownd via its private socket,
and use the functionality in logind instead.

The code pathes which talk to logind have to create their own ad-hoc
bus connection because by default, systemctl connects to systemd's
private socket.
2015-04-24 17:48:12 +02:00
Daniel Mack 867c37f6bb logind: add support for /run/nologin and /run/systemd/shutdown/scheduled
Port over more code from shutdownd and teach logind to write /run/nologin at
least 5 minutes before the system is going down, and
/run/systemd/shutdown/scheduled when a shutdown is scheduled.
2015-04-24 17:48:12 +02:00
Daniel Mack e2fa5721c3 logind: add code for UTMP wall messages
Add a timer to print UTMP wall messages so that it repeatedly informs users
about a scheduled shutdown:

 * every 1 minute with less than 10 minutes to go
 * every 15 minutes with less than 60 minutes to go
 * every 30 minutes with less than 180 minutes (3 hours) to go
 * every 60 minutes if more than that to go

This functionality only active if the .EnableWallMessages DBus property
is set to true. Also, a custom string can be added to the wall message,
set through the WallMessagePrefix property.
2015-04-24 17:48:12 +02:00
Daniel Mack 99f710dde8 shared/utmp-wtmp: add parameter for origin tty and callback userdata
Instead of looking up the tty from STDIN, let utmp_wall() take an argument
to specify an origin tty for the wall message. Only if that argument is
NULL do the STDIN lookup.

Also add an void *userdata argument that is handed back to the callback
function.
2015-04-24 17:48:12 +02:00
Daniel Mack 8aaa023ae7 logind: add .ScheduleShutdown and .CancelScheduledShutdown methods
Add a method called ScheduleShutdown in org.freedesktop.login1.Manager
which adds a timer to shut down the system at a later point in time.

The first argument holds the type of the schedule that is about to
happen, and must be one of 'reboot', 'halt' or 'poweroff'.

The second argument specifies the absolute time, based on
CLOCK_REALTIME in nanoseconds, at which the the operation should be
executed.

To cancel a previously scheduled shutdown, the CancelScheduledShutdown()
can be called, which returns a bool, indicating whether a scheduled
timeout was cancelled.

Also add a new property called ScheduledShutdown which returns the
equivalent to what was passed in via ScheduleShutdown, as '(st)' type.
2015-04-24 17:48:12 +02:00
Daniel Mack b7aa9589e0 logind: factor out polkit checks
Factor out the code to ask polkit for authorization from
method_do_shutdown_or_sleep() into an own function called
verify_shutdown_creds().

This is needed in order to also use the same checks when shutdown
operations are scheduled. For that, it's also necessary to allow
NULL values for that action{,_multiple_sessions,_ignore_inhibit)
arguments, which will suppress the call if no action string is
passed.
2015-04-24 17:48:12 +02:00
Daniel Mack 905f0a39ae logind: make local functions static
make manager_gc(), manager_startup(), manager_new(), manager_free()
and manager_run() static, and kill their forward declarations.
2015-04-24 17:48:12 +02:00
Daniel Mack c0f3280508 logind: use sd_event timer source for inhibitor logic
Instead of open-coding the delayed action and inhibit timeout logic,
switch over to a real sd_event_source based implementation.

This is not only easier to read but also allows us to add more timers
in the future.
2015-04-24 17:48:12 +02:00
Daniel Mack 3f61a7a6eb logind: drop unused argument from method_do_shutdown_or_sleep() 2015-04-24 17:48:12 +02:00
Lennart Poettering 47bc12e1ba unit: don't add automatic dependencies on device units if they aren't supported
http://lists.freedesktop.org/archives/systemd-devel/2015-April/031187.html
2015-04-24 17:28:31 +02:00
Lennart Poettering 658f26b828 units: set KillMode=mixed for our daemons that fork worker processes
The daemons should really have the time to kill the workers first,
before systemd does it, hence use KillMode=mixed for these daemons.

https://bugs.freedesktop.org/show_bug.cgi?id=90051
2015-04-24 16:14:46 +02:00
Lennart Poettering 007c6337c6 manager: don't fail fatally if we cannot coldplug a unit
It's better to continue as good as we can, than to totally fail. Hence,
let's log about the failure and continue.
2015-04-24 16:14:46 +02:00
Lennart Poettering f78f265f40 core: always coldplug units that are triggered by other units before those
Let's make sure that we don't enqueue triggering jobs for units before
those units are actually fully loaded.

http://lists.freedesktop.org/archives/systemd-devel/2015-April/031176.html
https://bugs.freedesktop.org/show_bug.cgi?id=88401
2015-04-24 16:14:46 +02:00
Daniel Mack 0108f6ecc8 core: return 0 from device_serialize()
Fixes:

  CC       src/core/libsystemd_core_la-device.lo
src/core/device.c: In function 'device_serialize':
src/core/device.c:169:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
2015-04-24 16:14:48 +02:00
Lennart Poettering be847e82cf Revert "core: do not spawn jobs or touch other units during coldplugging"
This reverts commit 6e392c9c45.

We really shouldn't invent external state keeping hashmaps, if we can
keep this state in the units themselves.
2015-04-24 15:51:10 +02:00
Daniel Mustieles 9211e87514 Update Spanish translation
https://bugs.freedesktop.org/show_bug.cgi?id=90163
2015-04-24 09:14:01 -04:00
Lennart Poettering f62009410a device: rework how we enter tentative state
This reworks how we enter tentative state and does so only when a device
was previously not announced via udev. The previous check actually just
checked whether a new state bit was set, which is not correct.

Also, to be able to reliably maintain the tentative state across daemon
reloads, we need to serialize and deserialize it.
2015-04-24 12:29:05 +02:00