Commit graph

134 commits

Author SHA1 Message Date
Lennart Poettering 3185a36b05 service: make main pid guessing optional, and reread pid file after reloads 2011-02-13 18:51:30 +01:00
Lennart Poettering 867b3b7d6b service: make chain of main commands and control commands independent of each other, so that both can be executed simultaneously and independently 2011-01-20 18:46:38 +01:00
Lennart Poettering c06b7a15ea service: don't allow reload operations for oneshot services
During starting of oneshot we are in START state which we don't want to
combine with the RELOAD state, hence we disallow both at the same time.
2011-01-20 18:44:09 +01:00
Lennart Poettering 9a57c62944 systemctl: highlight failed processes in systemctl status 2011-01-20 18:22:03 +01:00
Lennart Poettering e2f3b44cfc service: when reloading a service fails don't fail the entire service but just the reload job 2011-01-20 13:17:22 +01:00
Lennart Poettering d8cfa08589 service: if a reload operation fails, don't shut down the service 2011-01-18 22:57:46 +01:00
Lennart Poettering ba035df230 execute: make sending of SIGKILL on shutdown optional 2011-01-18 22:55:54 +01:00
Tom Gundersen 521e05c7ce arch: remove support for legacy daemons
This is now done by a generator, shipped downstream.
2011-01-17 22:41:19 +01:00
Lennart Poettering e83c7c0ba4 service: don't hit an assert if information in LSB headers is incorrectly formatted
https://bugzilla.redhat.com/show_bug.cgi?id=667665
2011-01-07 00:49:35 +01:00
Michael Biebl 5b8191986c service: ifdef (more) distro-specific compat logic
This should make it easier to get rid of that compat code later and
avoids problems like stripping of rc. from /etc/init.d/rc.local on
Debian.
2010-12-27 18:44:42 +01:00
Kay Sievers e1992852c8 service: ifdef distro-specific compat logic 2010-12-16 14:29:34 +01:00
Miklos Vajna 65530632c7 service: drop rc. prefix on frugalware linux 2010-12-16 14:22:21 +01:00
Kay Sievers 0b603b4e76 suse: add 'smtp' LSB facility 2010-12-09 18:50:30 +01:00
Miklos Vajna f5c88ec133 build-sys: frugalware linux support 2010-11-29 17:07:41 +01:00
Lennart Poettering d686d8a97b cgroup: by default, duplicate service cgroup in the cpu hierarchy 2010-11-17 21:27:53 +01:00
Lennart Poettering e3aa71c38c exec: automatically determine right TERM= setting based on tty name 2010-11-15 23:49:02 +01:00
Lennart Poettering af2d49f70b drop support for MANAGER_SESSION, introduce MANAGER_USER instead 2010-11-15 22:13:26 +01:00
Lennart Poettering 2edfa36685 service: delay automatic restart if job is pending 2010-11-10 22:38:43 +01:00
Lennart Poettering ead8e4788e unit: get rid of gnoreDependencyFailure= instead treat ConflictedBy= as weaker counterpart of Conflicts=, similar to Wants= vs. Requires= 2010-10-29 16:28:27 +02:00
Lennart Poettering 799fd0fd23 service: unify tstamp serialization code 2010-10-28 03:16:03 +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
Mike Kazantsev 0320828cac service: fix sysv-less build 2010-10-26 15:18:13 +02:00
Lennart Poettering 9865f3b4ca service: make sure to pass TERM=linux to all sysv scripts 2010-10-26 02:32:42 +02:00
Andrew Edmunds 858dae181b ubuntu: Treat Ubuntu as a distinct distro in configure.ac etc
Previously Ubuntu was treated as being equivalent to Debian, but the two
distributions require different behaviour in certain places.  This commit does
not change the behaviour of systemd on either distro but it creates a
framework for changes to be introduced by later commits.

The following previously meant "Target is Debian or Ubuntu".
    * configure option "--with-distro=debian"
    * C preprocessor symbol "TARGET_DEBIAN"
    * Automake conditional "TARGET_DEBIAN"
After this commit, all of the above are redefined to mean "Target is Debian"

The following are introduced to mean "Target is Ubuntu".
    * configure option "--with-distro=ubuntu"
    * C preprocessor symbol "TARGET_UBUNTU"
    * Automake conditional "TARGET_UBUNTU"

Most code written for Debian will also be applicable to Ubuntu. An extra
Automake conditional "TARGET_DEBIAN_OR_UBUNTU" is introduced to avoid
duplication of code that would otherwise occur.

This commit updates configure.ac, Makefile.am and distro-specific source files
in line with the above definitions.
2010-10-25 21:09:56 +02:00
Lennart Poettering 8a0867d6c5 systemctl: introduce systemctl kill 2010-10-22 16:11:50 +02:00
Lennart Poettering 0003d1ab75 manager: hookup shutdown helper and signals 2010-10-14 00:54:48 +02:00
Lennart Poettering 9fff8a1f16 mount: hook in q fsck@.service instance for all mount points with passno > 0 2010-10-13 03:57:04 +02:00
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