Commit Graph

82 Commits

Author SHA1 Message Date
Lennart Poettering 3d57c6ab80 exec: support unlimited resources 2011-04-04 18:15:13 +02:00
Michal Schmidt 07e833bc1d condition: add ConditionSecurity
Using ConditionSecurity a unit can depend on a security module being
enabled/disabled. For now the only recognized security module is SELinux.

I'd like to use this feature for a unit that creates /.autorelabel if
SELinux is disabled, to ensure a relabel is done automatically when the
system is later rebooted with SELinux enabled.
2011-04-03 22:16:37 +02:00
Michal Schmidt 41584525cf load-fragment: unify config_parse_condition_{kernel, virt}
They only differ in the condition type, otherwise the code is identical.
Replace them with a more generic config_parse_condition_string().
2011-04-03 22:16:23 +02:00
Lennart Poettering 7d76f31288 log: fix shifting of facilities 2011-03-31 21:22:44 +02:00
Kay Sievers 2b583ce657 use /run instead of /dev/.run
Instead of the /dev/.run trick we have currently implemented, we decided
to move the early-boot runtime dir to /run.

An existing /var/run directory is bind-mounted to /run. If /var/run is
already a symlink, no action is taken.

An existing /var/lock directory is bind-mounted to /run/lock.
If /var/lock is already a symlink, no action is taken.

To implement the directory vs. symlink logic, we have a:
  ConditionPathIsDirectory=
now, which is used in the mount units.

Skipped mount unit in case of symlink:
  $ systemctl status var-run.mount
  var-run.mount - Runtime Directory
    Loaded: loaded (/lib/systemd/system/var-run.mount)
    Active: inactive (dead)
            start condition failed at Fri, 25 Mar 2011 04:51:41 +0100; 6min ago
     Where: /var/run
      What: /run
    CGroup: name=systemd:/system/var-run.mount

The systemd rpm needs to make sure to add something like:
  %pre
  mkdir -p -m0755 /run >/dev/null 2>&1 || :
or it needs to be added to filesystem.rpm.

Udev -git already uses /run if that exists, and is writable at bootup.
Otherwise it falls back to the current /dev/.udev.

Dracut and plymouth need to be adopted to switch from /dev/.run to run
too.

Cheers,
Kay
2011-03-28 23:00:00 +02:00
Lennart Poettering 260abb780a exec: properly apply capability bounding set, add inverted bounding sets 2011-03-18 04:52:45 +01:00
Lennart Poettering 267632f0ab unit: distuingish mandatory from triggering conditions 2011-03-08 03:04:47 +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 039655a40c unit: introduce ConditionVirtualization= 2011-02-21 22:07:55 +01:00
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 b20c6be697 pam: optionally reset cgroup memberships for login sessions 2011-02-04 12:46:38 +01:00
Adrian Spinu 7115593375 load-fragment: properly parse Nice= value
Hello,

     i`ve been using systemd for a while now, and found out that when
using NICE parameter for .service files the varible is not set correctly.
     i`ve found the problem in file *load-fragment.c* function
*config_parse_nice*        variable /*c->nice_set = false;*/  should be
/*c->nice_set = true;*/
     Problem is alsom manifesting on v17 but did not upgrade yet ...
2011-02-03 21:23:32 +01:00
Lennart Poettering bd40a2d830 clang: fix some issues found with clang-analyzer 2011-01-22 02:19:16 +01:00
Lennart Poettering ba035df230 execute: make sending of SIGKILL on shutdown optional 2011-01-18 22:55:54 +01:00
Lennart Poettering 2292707df5 man: document missing KillSignal= and swap options 2011-01-18 00:40:10 +01:00
Lennart Poettering a6ff950e71 execute: drop empty assignments from env blocks on execution but keep them around otherwise to make them visible 2011-01-06 20:38:02 +01:00
Lennart Poettering afe4bfe2c1 fragment: allow prefixing of the EnvironmentFile= path with - to ignore errors 2011-01-06 01:39:08 +01:00
Lennart Poettering 5f7c426e2a fragment: properly handle quotes in assignments in EnvironmentFile= files 2011-01-05 16:06:35 +01:00
Lennart Poettering 36af55d997 unit: introduce ConditionDirectoryNotEmpty= 2010-11-15 22:13:25 +01:00
Lennart Poettering f90cf44c02 load-fragment: properly do comparison of words 2010-11-14 19:59:10 +01:00
Lennart Poettering d257ddef22 unit: add ConditionNull= condition 2010-11-10 22:39:18 +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 b81884e746 unit: replace StopRetroactively= by BindTo= dependencies
The property StopRetroactively= needs to be per-dependency, not
per-unit, in order to properly express dependencies between .mount units
and its .device and fsck .service units. If the .device unit is
unplugged the mount should go away, but if the fsck process terminates
the .mount should stay.
2010-10-29 00:45:46 +02:00
Lennart Poettering f14e15f8af unit: replace recursive_stop by stop_retroactively to simplify things a little 2010-10-28 03:38:52 +02:00
Lennart Poettering 8a0867d6c5 systemctl: introduce systemctl kill 2010-10-22 16:11:50 +02:00
Lennart Poettering 2ba545f1a0 service: implement FsckPassNo= option 2010-10-20 14:22:23 +02:00
Lennart Poettering 52661efd21 unit: add minimal condition checker for unit startup 2010-10-13 02:15:41 +02:00
Lennart Poettering 6daf4f9001 unit: rename 'banned' load state to 'masked' 2010-10-08 18:21:52 +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 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 f976f3f67c socket: make sockets to pass to a service configurable 2010-10-05 19:50:00 +02:00
Lennart Poettering d9ff321ad9 socket: make service to start on incoming traffic configurable 2010-10-05 19:50:00 +02:00
Lennart Poettering 6ccb1b4429 load-fragment: reset fragment_path if we couldn't find a unit file for it 2010-09-27 20:31:57 +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
Lennart Poettering 97c4a07df9 vconsole: add new utility to initialize the virtual console 2010-09-16 00:36:41 +02:00
Lennart Poettering dd6c17b159 exec: replace OOMAdjust= by OOMScoreAdjust= to follow new kernel interface
This replaces OOMAdjust= by OOMScoreAdjust= in the config files,
breaking compatibility with older unit files. However, this keeps compat
with older kernels which lack the new OOM rework.
2010-08-31 01:33:43 +02:00
Lennart Poettering 2528a7a62c unit: introduce AllowIsolate= switch 2010-08-30 23:04:36 +02:00
Lennart Poettering 02ee865a46 service: rename ValidNoProcess= to RemainAfterExit= 2010-08-17 19:37:36 +02:00
Lennart Poettering c0b346969d load-fragment: make parser more forgiving 2010-08-17 03:30:53 +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 b5e9dba8d6 unit: rename OnlyByDependency= to RefuseManualStart= and introduce RefuseManualStop=
Some unit shall never be start on user request (e.g. shutdown.target)
others never be stopped on user request (e.g. auditd.servce), hence
offer options for both.
2010-08-11 01:44:37 +02:00
Tomasz Torcz cebf8b2092 socket: Allow selection of TCP Congestion Avoidance algorithm to socket
Hi,

attached path extends socket configurables with another
knob - TCP Congestion Avoidance selection. Linux implements
handful of those, useful in various situations. For example,
TCP Low Priority may be used by FTP service to gracefully
yield bandwidth for more important TCP/IP streams.

Until recently TCP_CONGESTION was Linux-specific, recently
FreeBSD 8 and OpenSolaris gained compatible support.
2010-08-03 23:23:47 +02:00
Lennart Poettering 294d81f124 load: make sure that unit files in /etc/ always take precedence, even over link targets, to make them easily overrdiable 2010-07-21 03:28:10 +02:00
Lennart Poettering 8f05424d50 unit: allow symlinking unit files to /dev/null 2010-07-21 03:13:15 +02:00
Lennart Poettering faf919f1eb job: timeout every job independently of the unit 2010-07-17 04:09:28 +02:00
Lennart Poettering 45fb0699c4 systemctl: warn when operating on service files that changed on disk but haven't been reloaded 2010-07-17 00:57:51 +02:00
Lennart Poettering 3b6fdb5b5a unit: introduce IgnoreDependencyFailure= 2010-07-12 03:07:02 +02:00
Lennart Poettering b708e7cea9 execute: optionally ignore return status of invoked commands 2010-07-12 03:07:01 +02:00
Lennart Poettering fe51822e71 manager: introduce unit path cache to minimize disk accesses 2010-07-11 00:52:00 +02:00