Commit Graph

172 Commits

Author SHA1 Message Date
Lennart Poettering a8f11321c2 systemctl: support remote and privileged systemctl access via SSH and pkexec
This adds support for executing systemctl operations remotely or as
privileged user while still running systemctl itself unprivileged and
locally.

This currently requires a D-Bus patch to work properly.

https://bugs.freedesktop.org/show_bug.cgi?id=35230
2011-03-12 01:07:17 +01:00
Lennart Poettering 90bbc9469e condition: take a timestamp and store last result of conditions 2011-03-09 23:58:17 +01:00
Andrey Borzenkov 1de4d79bf5 build-sys: add Mandriva distribution support
This merges several separate patches that I carry as part of
Mandriva systemd RPM. They touch those parts that are very
unlikely to be changed in near future and do not impose any
functionality change for systemd core. I also think it is
useful for troubleshooting to have real distribution name in
system logs, espicially when someone reports problem upstream.

The patch looks bigger than sum of replaced patches because

- previous patches were applied on top of distro=fedora, now
I need to add all those bits for distro=mandriva as well

- part of patch was done as spec file magic, but it seems more
logical to ship all these bits together
2011-03-08 19:47:36 +01:00
Lennart Poettering 83310f162d systemctl: when forwarding is-enabled to chkconfig hardcode runlevel 3 2011-03-08 01:53:47 +01:00
Lennart Poettering d68201e9aa job: introduce new job result code 'skipped' to use when pre conditions of job did not apply
https://bugzilla.redhat.com/show_bug.cgi?id=682245
https://bugzilla.redhat.com/show_bug.cgi?id=635780
2011-03-08 01:53:47 +01:00
Lennart Poettering 63a723f3a7 systemctl: fix exit code when directing is-enabled to chkconfig 2011-03-04 19:48:38 +01:00
Lennart Poettering 8c7be95e5a execute: load environment files at time of execution, not when we load the service configuration
https://bugzilla.redhat.com/show_bug.cgi?id=661282
2011-03-04 03:44:43 +01:00
Lennart Poettering 430c18ed7f kill: always send SIGCONT after SIGTERM
When we kill a process to terminate it make sure to send SIGCONT to
ensure it is unpaused and processes the signal.
2011-03-03 23:55:30 +01:00
Lennart Poettering 64e5f1b721 systemctl: add condreload alias for compat with ALTLinux 2011-03-01 22:20:13 +01:00
Lennart Poettering c0f9c7da07 systemctl: shutdown agent explicitly so that it can reset the tty properly 2011-02-25 02:51:48 +01:00
Lennart Poettering 8e20e31a65 systemctl: properly handle job results 2011-02-24 03:24:51 +01:00
Lennart Poettering 5d44db4a90 dbus: pass along information why a job failed when it failed (dbus api change!) 2011-02-24 02:36:34 +01:00
Kay Sievers 5622dde36d systemctl: shutdown(8) - call kexec if kexec kernel is loaded 2011-02-20 21:09:07 +01:00
Lennart Poettering e67c3609b1 systemctl: introduce --ignore-dependencies 2011-02-16 21:59:31 +01:00
Lennart Poettering 30732560c4 systemctl: introduce --failed to show only failed services 2011-02-16 20:34:59 +01:00
Lennart Poettering 7fc01d3319 systemctl: minor optimizations 2011-02-13 17:18:45 +01:00
Lennart Poettering 060ed82ec2 systemctl: don't unnecessarily close stdin/stdout/stderr for tty agent so that locking by tty works 2011-02-13 17:09:29 +01:00
Lennart Poettering b1c0f1c136 systemctl: fix opening params 2011-02-09 01:11:19 +01:00
Lennart Poettering 715554e7b2 systemctl: don't start agent for --user 2011-02-09 01:09:09 +01:00
Lennart Poettering 7f6d613516 systemctl: make sure the tty agent does not retain a copy of stdio
https://bugzilla.redhat.com/show_bug.cgi?id=674916
2011-02-09 01:00:21 +01:00
Lennart Poettering bd40a2d830 clang: fix some issues found with clang-analyzer 2011-01-22 02:19:16 +01:00
Lennart Poettering 9a57c62944 systemctl: highlight failed processes in systemctl status 2011-01-20 18:22:03 +01:00
Lennart Poettering 0129173ab0 systemctl: show process type along process exit codes 2011-01-20 13:24:24 +01:00
Lennart Poettering 4bc5f808e4 systemctl: before spawning pager cache number of columns 2011-01-18 23:12:49 +01:00
Lennart Poettering 75d12d5767 systemctl: Don't use Debian's 'sensible-pager', use 'pager' instead 2011-01-04 14:54:53 +01:00
Lennart Poettering 4c00bf2561 systemctl: drop redundant getenv('LESS') check 2011-01-04 01:18:57 +01:00
Lennart Poettering ec14911e0d systemctl: spawn pager only for commands that generates long output 2011-01-04 01:04:20 +01:00
Lennart Poettering 1888c9074a systemctl: make the child the pager, leave systemctl as parent
It's nicer if the child process gets reinitialized cleanly instead of
the parent process.
2011-01-04 00:58:35 +01:00
Lennart Poettering 611efaac7a systemctl: try harder to find a suitable pager 2011-01-04 00:47:40 +01:00
Miklos Vajna 0736af98c6 systemctl: implement auto-pager a la git 2011-01-02 18:17:19 +01:00
Lennart Poettering be8088a2fb systemctl: don't return LSB status error codes for systemctl show
Use them only for systemctl status.

https://bugzilla.redhat.com/show_bug.cgi?id=637183
2010-11-21 22:40:03 +01:00
Lennart Poettering c8b2e52cf6 systemctl: redirect enable/disable to chkconfig if applicable 2010-11-21 22:17:04 +01:00
Lennart Poettering af2d49f70b drop support for MANAGER_SESSION, introduce MANAGER_USER instead 2010-11-15 22:13:26 +01: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 9feeba4bbb systemctl: always show what and where for mount units in status output 2010-10-28 22:11:45 +02:00
Lennart Poettering 4fbf50b38e service: when after startup only one process is in a service's cgroup, assume it is the main process 2010-10-27 03:16:49 +02:00
Lennart Poettering da8f9f8cff errors: refer to systemctl status when useful 2010-10-26 22:40:02 +02:00
Lennart Poettering 501fc174c2 systemctl: automatically spawn temporary password agent when we might need one 2010-10-26 05:29:39 +02:00
Lennart Poettering 8a0867d6c5 systemctl: introduce systemctl kill 2010-10-22 16:11:50 +02:00
Lennart Poettering 688c672501 systemctl: fix counting in list-units output
https://bugzilla.redhat.com/show_bug.cgi?id=643502
2010-10-19 19:43:47 +02:00
Lennart Poettering b4f27ccc63 systemctl: accept -f as short for --force 2010-10-14 03:19:13 +02:00
Lennart Poettering 20b09ca7fd systemctl: rework halt/reboot/poweroff/kexec/exit logic around --force 2010-10-14 00:56:12 +02:00
Lennart Poettering 560d8f2381 systemctl: warn if user enables unit with no installation instructions 2010-10-13 03:13:23 +02:00
Lennart Poettering 538da63d53 systemctl: drop [] around date in status output 2010-10-12 04:08:04 +02:00
Lennart Poettering 4a9e2fffdf systemctl: show whether we follow somebody in 'status' output 2010-10-12 04:08:01 +02:00
Lennart Poettering b9c0d4415b systemctl: fix 'systemctl enable getty@.service' 2010-10-08 03:09:25 +02:00
Lennart Poettering 00dc5d769a unit: introduce 'banned' load state for units symlinked to /dev/null 2010-10-08 02:31:36 +02:00
Lennart Poettering 0e098b15c7 util: never use sizeof(sa_family_t) when calculating sockaddr sizes 2010-10-07 02:34:17 +02:00
Lennart Poettering 71fad67514 systemctl: require correctly formed unit names when enabling units 2010-10-06 02:33:40 +02:00
Fabiano Fidencio 07459bb6b9 sysv: optionally disable of SysV init/rcN.d support at compile time
This patch adds a cpp definition HAVE_SYSV_COMPAT that is used to
isolate code dealing with /etc/init.d and /etc/rcN.d for systems where
it does not make sense (one that does not use sysv or one that is fully
systemd native).

The patch tries to be as little intrusive as possible, however in
order to minimize the number of #ifdef'ed regions I've reordered some
code in path-lookup.c:lookup_paths_init() where all code dealing with
sysv is now isolated under running_as == MANAGER_SYSTEM as well.

Moreover, In struct Service, some fields were rearranged to reduce
the number of ifdefs.

Lennart's suggestions were fixed and squashed with the original patch,
that was sent by Gustavo Sverzut Barbieri (barbieri@profusion.mobi).
2010-09-27 03:25:05 +02:00