Commit graph

20 commits

Author SHA1 Message Date
Lennart Poettering 04ebb59567 shutdownd: rework interface, allow subscribing to scheduled shutdowns
This extends the shutdownd interface to expose schedule shutdown
information in /run/systemd/shutdown/schedule.

This also cleans up the shutdownd protocol and documents it in a header
file sd-shutdown.h.

This is supposed to be used by client code that wants to control and
monitor scheduled shutdown.
2012-04-11 02:04:46 +02:00
Lennart Poettering 4cfa2c999d core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
Lennart Poettering 81527be142 build-sys: move public header files into a dir of their own 2012-01-05 16:01:58 +01:00
Michal Schmidt 75d3fc60f8 shutdownd: use PassCred=yes in the socket unit
Since Linux 3.2 in order to receive SCM_CREDENTIALS it is not sufficient
to set SO_PASSCRED just before recvmsg(). The option has to be already
set when the sender sends the message.

With socket activation it is too late to set the option in the service.
It must be set on the socket right from the start.

See the kernel commit:
16e57262 af_unix: dont send SCM_CREDENTIALS by default

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=757628
2011-11-30 10:12:59 +01:00
Lennart Poettering 4c12626c8e umask: change default umask to 0022 just to be sure, and set it explicitly in all binaries, in order to make sure it is set when started from the terminal 2011-08-01 20:52:18 +02:00
Michal Schmidt 30923233b3 shutdown: print the standard wall message even when the user provided one
Print the user-provided wall message in addition to the standard one, not
instead of it.

Related to: https://bugzilla.redhat.com/show_bug.cgi?id=624149
2011-07-03 00:15:43 +02:00
Michal Schmidt 52c002150a shutdown: respect the dry run option '-k'
Don't do the actual power-off/reboot when '-k' is passed to shutdown.

Related to: https://bugzilla.redhat.com/show_bug.cgi?id=624149
2011-07-03 00:12:16 +02:00
Lennart Poettering 34ca941cec util: make a couple of files we write atomic 2011-06-21 19:29:45 +02:00
Kay Sievers db019b8dd2 change remaining /var/run to /run 2011-04-04 15:33:00 +02:00
Lennart Poettering da19d5c19f src: our lord is coverity 2011-03-31 15:35:40 +02:00
Lennart Poettering 7af53310dd ask-password: don't show wall message on ttys we are already running a tty agent on 2010-11-12 03:33:08 +01:00
Lennart Poettering ef9ffbd806 shutdown: create /var/run/nologin instead of /etc/nologin which is supported since PAM 1.1.2 2010-10-07 20:46:02 +02:00
Lennart Poettering 22f4096ca9 systemctl: rework exit codes for all utility programs to follow LSB or other standards 2010-08-31 21:05:54 +02:00
Lennart Poettering 16061c20dd shutdownd: kill /etc/nologin file before we go down 2010-08-16 23:52:19 +02:00
Lennart Poettering 08e4b1c5c8 shutdown: various fixes for handling of delayed shutdowns 2010-08-16 22:40:11 +02:00
Lennart Poettering 2396fb04f7 log: properly open log target in the various utilities 2010-08-16 22:39:02 +02:00
Lennart Poettering 116205924e util: use format_timestamp() instead of ctime() wherever possible 2010-08-16 21:24:50 +02:00
Lennart Poettering 9be9828c00 systemctl: warn in intervals before going down when delayed shutdown is used 2010-08-16 19:26:27 +02:00
Lennart Poettering 6b5ad000ab shutdown: if now time argument is passed, imply +1 not +0
That should friendlier for folks who just run "shutdown" to figure out
the command line arguments...

https://bugzilla.redhat.com/show_bug.cgi?id=624149
2010-08-16 17:12:40 +02:00
Lennart Poettering f614480831 systemctl: add support for delayed shutdown, similar to sysv in style 2010-08-16 15:37:52 +02:00