Commit Graph

107 Commits

Author SHA1 Message Date
Lennart Poettering 50caaedb2c service: introduce Restart=on-failure and Restart=on-abort 2010-10-08 18:34:54 +02:00
Lennart Poettering 169c1bda80 service: optionally, create INIT_PROCESS/DEAD_PROCESS entries for a service
This should fix accounting for pam_limits and suchlike.

https://bugzilla.redhat.com/show_bug.cgi?id=636036
2010-10-08 16:07:50 +02:00
Lennart Poettering f34277d911 service: increase default timeout for sysv scripts to 3min
For SysV services we cannot set the timeout inside the configuration
file. Hence let's pick a large timeout by default.

https://bugzilla.redhat.com/show_bug.cgi?id=635393
2010-10-08 02:49:44 +02:00
Lennart Poettering 525ee6f4a1 service: rename settings for Restart= from 'restart-always' to 'always' and similar 2010-10-05 20:30:44 +02:00
Lennart Poettering f976f3f67c socket: make sockets to pass to a service configurable 2010-10-05 19:50:00 +02:00
Lennart Poettering ee95669fb6 service: first lookup LSB facility names in tables, only then suppress self-provides 2010-09-28 21:08:39 +02:00
Matthias Schiffer 409db00299 service: Don't crash because of double free when Arch services are disabled in rc.conf 2010-09-28 19:41:04 +02:00
Lennart Poettering 0b5d26f95d service: filter out empty LSB description strings 2010-09-28 18:30:43 +02:00
Lennart Poettering a7d3cc26f9 service: when resolving sysv names drop leading $ 2010-09-28 18:30:43 +02:00
Lennart Poettering caca31b576 service: shortcut sysv provides on ourselves 2010-09-28 00:29:09 +02:00
Lennart Poettering cb33e40000 service: ignore sysv $null service 2010-09-28 00:28:16 +02:00
Lennart Poettering 9f151f29fd service: don't create sysv order deps on merged units 2010-09-27 23:24:17 +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
Tom Gundersen 980900c1d9 service: start Arch daemons
Arch does not use proper SysV runlevels. Instead /etc/rc.conf contains
an array of daemons to load in a multi-user runlevel, and some
dependencies between them.

This patch enables this behaviour in SystemD (only when compiled with
Arch support), which allows SystemD to be a drop in replacement on Arch
(modulo some minor bugs).

v2: simplified after suggestion from Lennart
2010-09-21 01:32:21 +02:00
Lennart Poettering f21781d57f service: fix check for non-LSB files 2010-09-14 00:23:15 +02:00
Lennart Poettering 32159d3a94 service: add generic LSB provides handling for facilities 2010-09-13 23:54:21 +02:00
Lennart Poettering 4f7dcad328 service: translate 'httpd' LSB Provides into '$httpd' on Fedora 2010-09-13 23:53:59 +02:00
Lennart Poettering ee0dd8021b service: don't automatically add D-Bus service name as an alias to all dbus service, rely on manual symlinks to allow disabling of dbus services 2010-09-11 01:31:58 +02:00
Lennart Poettering f73d93a4d9 service: calculate sysv startup priority only in start runlevels 2010-09-03 04:08:16 +02:00
Lennart Poettering c68364b790 service: make sure we properly figure out whether a sysv service is enabled before creating $foo wants links 2010-09-03 03:56:05 +02:00
Lennart Poettering 7f97f0fee4 service: properly handle if the main process is down and we wait for the cgroup to die, too 2010-09-03 01:42:57 +02:00
Lennart Poettering 28708d8aa0 service: recheck PID status when a cgroup runs empty 2010-09-01 01:33:12 +02:00
Lennart Poettering f5a501146a service: wait for process exit only if we actually killed somebody 2010-09-01 00:48:05 +02:00
Michal Schmidt 7b2603e646 service: properly pass dbus error structure 2010-08-31 23:52:51 +02:00
Lennart Poettering ca949c9dcf service: rework killing logic so that we always kill the main process, even if it left our service cgroup
Related to:

http://bugzilla.redhat.com/show_bug.cgi?id=626477
2010-08-31 23:24:47 +02:00
Matthew Miller fdf20a3160 manager: add missing second part of s/maintenance/failed/ 2010-08-31 00:23:34 +02:00
Lennart Poettering 3177a49ce9 service: properly handle Fedora's broken MTA meta-service name 2010-08-26 04:10:40 +02:00
Lennart Poettering 43a3754933 service: reword warnings a little 2010-08-26 04:10:17 +02:00
Lennart Poettering 42a097a253 service: if we cannot add an alias to a sysv service, ignore this and go on 2010-08-26 04:08:28 +02:00
Lennart Poettering c4e2ceae94 dbus: follow standardized fdo PropertiesChanged signal spec 2010-08-20 02:31:54 +02:00
Lennart Poettering d06dacd002 service/systemctl: don't consider LSB exit codes 5 and 6 as failure, and decode exit codes in systemctl 2010-08-20 02:31:54 +02:00
Lennart Poettering 8a2b3c097b service: make sure sysv services marked as interactive in the LSB header get output on the TTY in all cases 2010-08-20 02:31:54 +02:00
Lennart Poettering 02ee865a46 service: rename ValidNoProcess= to RemainAfterExit= 2010-08-17 19:37:36 +02:00
Lennart Poettering 4694836523 service: prefix descriptions when they come from legacy sources 2010-08-17 18:59:05 +02:00
Lennart Poettering d6c9574fb5 emacs: make sure nobody accidently adds tabs to our sources 2010-08-14 19:59:25 +02:00
Lennart Poettering 34e9ba669e service: rename Type=finish to Type=oneshot and allow multiple ExecStart= lines for oneshot services
In contrast to the other service types oneshot services are usually not
long lasting and there's not necessarily a single clean main process for
them. This change allows multiple ExecStart= lines for this type of
services so that the admin/developer doesn't have to arbitrarily pick on
of various sequential commands as the "main one".
2010-08-13 18:23:01 +02:00
Lennart Poettering e364ad0628 clang: fix numerous little issues found with clang-analyzer 2010-08-11 22:04:25 +02:00
Lennart Poettering 47342320a0 main: fix auto restarting of units after a configuration reload 2010-08-09 23:53:49 +02:00
Lennart Poettering 69dd2852bb manager: when two pending jobs conflict, keep the one that "conflicts", remove the one that is "conflicted"
This gives the writer of units control which unit is kept and which is
stopped when two units conflict.
2010-08-09 22:32:30 +02:00
Lennart Poettering 6e98720f14 service: hide output of sysv scripts if quiet is passed on the kernel cmdline 2010-08-09 18:00:24 +02:00
Lennart Poettering 5de6b30219 service: properly remember if a sysv is actually enabled
Previously we checked the SysV priority value to figure out if a SysV
unit was enabled or not, since th value was mostly read from the S
startup links. Since we read this value from the LSB headers as a
fallback we hence ended up considering a lot more services enabled than
were actually enabled.

This patch adds an explicit boolean which encodes whether a sysv service
is enabled or not via S links.

https://bugzilla.redhat.com/show_bug.cgi?id=615293
2010-08-09 17:12:25 +02:00
Lennart Poettering 2cf3143ac3 service: show restart value in dump 2010-08-09 17:07:05 +02:00
Lennart Poettering d4054675b1 service: read special startup dirs only on the respective distros 2010-08-05 20:28:51 +02:00
Lennart Poettering eeaafddcb5 service: always sort services from suse B runlevel before services from normal runlevels 2010-08-05 19:50:03 +02:00
Lennart Poettering 3a2776bc86 service: save/restore status text string 2010-07-21 05:16:45 +02:00
Lennart Poettering 9d25f5ed7b sysv: do not add sysv services that are not enabled in /etc/rcN.d/ to network.target or other LSB-style Provides: targets 2010-07-20 22:30:45 +02:00
Lennart Poettering 5632e3743d systemctl: introduce reset-maintenance command 2010-07-19 04:08:07 +02:00
Lennart Poettering 92abbefbef execute: bump up log level of executed processes that failed 2010-07-17 04:17:30 +02:00
Lennart Poettering cac6f7c872 service: refuse to start services that are configured for per-connection instantiation to start without a socket 2010-07-16 19:41:11 +02:00
Lennart Poettering 5830833f7c service: allow input from terminal when executing more than one start-pre or stop-post command 2010-07-12 21:56:51 +02:00