Commit Graph

5665 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
952d97ed2b random-seed: improve debugging messages a bit 2013-11-15 22:53:14 -05:00
Zbigniew Jędrzejewski-Szmek
4e8da52959 fstab-generator: use RequiresOverridable for fsck units
This allows the user to disable fsck's by masking.

If fsck fails, emergency target is started, the user might mount the
unit using mount and disable fsck by masking the unit. In this case,
.mount will be active because the mount is detect through
/proc/self/mountinfo, but systemd-fsck@.service will still be in
failed mode. This results in a funny situation where

$ systemctl show -p ActiveState local-fs.target yyy.mount
ActiveState=active
ActiveState=active

$ sudo systemctl start local-fs.target
[sudo] password for test:
Failed to start local-fs.target: Unit systemd-fsck@xxx.service is masked.
2013-11-15 22:53:14 -05:00
Zbigniew Jędrzejewski-Szmek
e48614c4b2 core: some more _cleanup_free_ 2013-11-15 22:53:14 -05:00
Zbigniew Jędrzejewski-Szmek
94192cdaf6 fsck,fstab-generator: be lenient about missing fsck.<type>
If fstab contains 1 for passno, treat this as an error, but only warn
briefly. If fstab doesn't contain this information, don't complain at
all.

Patch is complicated a bit by the fact that we might have the fstype specified
in fstab or on /proc/cmdline, in which case we can check if we have the appropriate
fsck tool, or not specified, or specified as auto, in which case we have to look
and check the type of the filesystem ourselves. It cannot be done before the
device appears, so it is too early in the generator phase, and it must be done
directly in fsck service.
2013-11-15 22:53:14 -05:00
Zbigniew Jędrzejewski-Szmek
e375825da0 fsck: modernization 2013-11-15 22:53:14 -05:00
Tom Gundersen
b4f2a5b197 rtnl: add event loop integration 2013-11-14 23:22:58 +01:00
Tom Gundersen
0927756b8d bus: typo
Fix a couple of 'void' that should have been 'sd_bus'.
2013-11-14 22:19:48 +01:00
Tom Gundersen
81eca919f7 loopback-setup: move to rtnl
This should be equivalent to the old behavior.
2013-11-14 15:11:15 +01:00
Tom Gundersen
e16bcf986e rtnl: add call_async and call_async_cancel
They work in the same way as the sd-bus equivalents.
2013-11-14 14:32:48 +01:00
Olivier Brunel
5b1869eaa2 Fix possible lack of status messages on shutdown/reboot
Since 31a7eb86 the output on console can be disabled to avoid colliding with
gettys. However, it could also lead to a lack of messages during
shutdown/reboot.
2013-11-13 23:22:31 -05:00
Olivier Brunel
2f38577f30 Only disable output on console during boot if needed
If there are no more jobs on console, no need/we shouldn't disable output.
2013-11-13 23:22:31 -05:00
Olivier Brunel
8aa5429a4a Resolve /dev/console to the active tty instead of just "tty0"
When resolving /dev/console one would often get "tty0" meaning the active VT.
Resolving to the actual tty (e.g. "tty1") will notably help on boot when
determining whether or not PID1 can output to the console.
2013-11-13 23:22:30 -05:00
Umut Tezduyar Lindskog
ad79565d6b journal: timestamp support on console messages
journald mimics the kernel here: timestamps will be printed if
/sys/module/printk/parameters/time contains "Y".
2013-11-13 22:44:37 -05:00
Tom Gundersen
4555ec72d6 rtnl: start adding support for asynchronous messaging
Similarly to sd-bus, add:

sd_rtnl_wait
sd_rtnl_process
sd_rtnl_send

and adapt sd_rtnl_call accordingly.
2013-11-13 19:52:17 +01:00
Tom Gundersen
fe4824e065 rtnl: rename rtnl_bus_send_with_reply_and_block() to rtnl_bus_call()
Follow the equivalent rename in sd-bus to stay as similar as possible.
2013-11-13 19:48:44 +01:00
Thomas Hindoe Paaboel Andersen
38fdcbedd1 logind: create the session fifo before saving the session file
If the session fifo is not created the session state written to
the session file is "closing". This caused the lock screen in
gnome-shell to go into a loop trying to find the active session.

The problem was introduced in the sd-bus port in
cc37738108

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=71525
2013-11-13 18:06:34 +01:00
Mantas Mikulėnas
ed6556920c activate: fix crash when -s is passed
getopt_long() was told to accept -s which was never implemented.
2013-11-14 00:20:43 +10:00
Mantas Mikulėnas
df49ccafc0 activate: mention -E in the help text 2013-11-14 00:19:43 +10:00
Mantas Mikulėnas
6ce774fd80 systemctl: honor --no-legend in 'list-jobs' 2013-11-14 00:17:23 +10:00
Kay Sievers
b26618399e udev: declare some symbols static 2013-11-13 03:34:24 +01:00
Zbigniew Jędrzejewski-Szmek
a23873387a systemd-python: fix booted() and add two functions to docs
For some reason sphinx doesn't want to show inherited C functions.
2013-11-12 19:01:50 -05:00
Zbigniew Jędrzejewski-Szmek
f1e0c18340 build-sys: add a link test for exported symbols
I know that this is a pretty big net to catch some small fish,
but we *do* regularly forget to properly export symbols that
were supposed to be exported.

This time sd_bus_get_current and some renamed symbols are caught.
2013-11-12 18:58:34 -05:00
Kristian Høgsberg
735e5d83ee uaccess: Add new DRM render nodes 2013-11-12 18:11:43 +01:00
Kay Sievers
e3dc56a219 udev: declare some symbols static 2013-11-12 18:09:08 +01:00
Kay Sievers
d311601f5b bus: test-bus-objects - add missing header 2013-11-12 15:49:36 +01:00
Lennart Poettering
3db0e46b0d bus: add missing dump.[ch] 2013-11-12 12:11:24 +01:00
Lennart Poettering
2b5c5383e4 bus: beautify bus_message_dump() output a bit 2013-11-12 00:12:44 +01:00
Lennart Poettering
7b0b392f7b busctl: show machine name of all registered names 2013-11-12 00:12:44 +01:00
Lennart Poettering
8d162091c0 bus: set no_auto_start flag for GetMachineId calls, so that we don't auto-start if we want to know the machine of a bus service 2013-11-12 00:12:44 +01:00
Lennart Poettering
a8a07f892c bus: detect blocking message calls to our own connection and return ELOOP early 2013-11-12 00:12:44 +01:00
Lennart Poettering
1fee9de509 bus: add api to control auto start message flag 2013-11-12 00:12:44 +01:00
Lennart Poettering
9b271c0316 id128: introduce SD_ID128_STRING_MAX consant for sizing id128 strings 2013-11-12 00:12:44 +01:00
Lennart Poettering
98f91566cc bus: export utf8 validator calls as pure functions 2013-11-12 00:12:44 +01:00
Lennart Poettering
76b543756e bus: introduce concept of a default bus for each thread and make use of it everywhere
We want to emphasize bus connections as per-thread communication
primitives, hence introduce a concept of a per-thread default bus, and
make use of it everywhere.
2013-11-12 00:12:43 +01:00
Lennart Poettering
afc6adb5ec bus: introduce concept of a "default" event loop per-thread and make use of it everywhere
Try to emphasize a bit that there should be a mapping between event
loops and threads, hence introduce a logic that there's one "default"
event loop for each thread, that can be queried via
"sd_event_default()".
2013-11-12 00:12:43 +01:00
Lennart Poettering
d5e4ec5b1e test: fix minor memory leak in test-event 2013-11-12 00:12:43 +01:00
Lennart Poettering
c49b30a235 bus: rename sd_bus_send_with_reply_and_block() to sd_bus_call()
The call is one of the most important ones we expose, where we place
major emphasis on. We should make sure to give it a short, memorable
name.
2013-11-12 00:12:43 +01:00
Kay Sievers
1823b86ebf systemctl: warning: ‘r’ may be used uninitialized in this function 2013-11-11 17:18:51 +01:00
Zbigniew Jędrzejewski-Szmek
ad83b4c47c systemctl: avoid unitialized access when showing 0 timers 2013-11-11 10:55:51 -05:00
Lennart Poettering
938bcbab12 bus: add APIs for adding iovecs to messages as string or arrays 2013-11-11 16:26:12 +01:00
Lennart Poettering
cbb76c29cc systemctl: add new "list-timers" command 2013-11-11 15:54:43 +01:00
Lennart Poettering
966204e010 timer: consider (usec_t) -1 an invalid timestamp 2013-11-11 15:54:42 +01:00
Lennart Poettering
1fcf71f562 timer: properly format relative timestamps in the future 2013-11-11 15:54:42 +01:00
Lennart Poettering
60411ac750 bus: we really need to get rid of the :no-sender hack
This is where a hack from PID 1 spilled into the client side. We need
to get rid of this as soon as PID 1 is converted to libsystemd-bus.
2013-11-10 23:54:55 +01:00
Lennart Poettering
369c583b3f bus: actually export sd_utf8_is_valid() and sd_ascii_is_valid() 2013-11-10 23:54:55 +01:00
Lennart Poettering
f959af205a bus: use ENXIO as error condition when trying to exit a container when we are not in any
So far we used ENXIO whenever the user tried to read something from a
function that didn't carry the right type, and hence use the same error
here to indicate that what the user expected and what was in the message
didn't match up.
2013-11-10 23:54:55 +01:00
Thomas Hindoe Paaboel Andersen
c2e0d600ed analyze: plot the time spent setting up security modules 2013-11-10 23:21:15 +01:00
Lennart Poettering
95056b27a0 button: don't exit if we cannot handle a button press 2013-11-10 23:05:32 +01:00
Zbigniew Jędrzejewski-Szmek
2bba9a57e7 bus: fix build with old glibc 2013-11-09 20:31:12 -05:00
Zbigniew Jędrzejewski-Szmek
0a9776c230 systemctl: make sure daemon-reload returns success
Also change sd_bus_message_exit_container to return -ENOENT
when not in a container, to make it easier to distinguish different
errors.
2013-11-09 19:41:00 -05:00