1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-08 11:27:32 +03:00
Commit Graph

3390 Commits

Author SHA1 Message Date
Michal Schmidt
c5419d4239 service: don't warn if the pidfile still exists after SIGCHLD
A service that drops its privileges may not be able to remove it when it
exits. The stale pidfile is not a problem as long as the service
carefully recognizes it on its next start.

systemd would produce a warning after the service exits:
  PID ... read from file ... does not exist. Your service or init
  script might be broken.

Silence the warning in this case. Still warn if this error is detected
when loading the pidfile after service start.

Noticed by Miroslav Lichvar in
 https://bugzilla.redhat.com/show_bug.cgi?id=752396
2011-11-10 10:18:08 +01:00
Michal Schmidt
42c3673e63 units/suse: let rc-local.service log to syslog
Same change as the previous commit did for Fedora. fcrozat agreed.
2011-11-09 10:10:38 +01:00
Michal Schmidt
9d7286112d units/fedora: let rc-local.service log to syslog
rc-local.service should not be excluded from the default stdout logging.

Missing logs were noticed by Andrew McNabb in
 https://bugzilla.redhat.com/show_bug.cgi?id=750032#c3
2011-11-09 09:22:30 +01:00
Michal Schmidt
c99e42c1db units: drop unnecessary 'StandardOutput=syslog'
DefaultStandardOutput is syslog anyway. There's no reason to assume that
the administrator would want these units to be excluded when he configures
a different DefaultStandardOutput.
2011-11-09 08:48:25 +01:00
Lennart Poettering
1e2579fdeb Merge branch 'master' into journal 2011-11-08 19:44:16 +01:00
Lennart Poettering
a40593a0d0 TODO 2011-11-08 19:12:29 +01:00
Lennart Poettering
de190aef08 journal: implement multiple field matches 2011-11-08 18:20:03 +01:00
Lennart Poettering
9b3c575ed9 macro: fix ALIGN_TO macro definition 2011-11-08 18:18:48 +01:00
Michal Schmidt
75c982a79f man: fix a typo in signal number 2011-11-07 01:10:35 +01:00
Michal Schmidt
4743137a4b utmp: for DEAD_PROCESS write the current time to wtmp
Zeroed .ut_tv values in wtmp confuse chkrootkit.

Reported and debugged by Norman Smith. This is based on his patch,
but modified to behave more like upstart did in F14 and cleaned up.

https://bugzilla.redhat.com/show_bug.cgi?id=743696
2011-11-07 01:10:35 +01:00
Michal Schmidt
fa4ad7ceca utmp: initialize store with the found entry, not with the lookup key 2011-11-07 01:10:35 +01:00
Michal Schmidt
b8e47420b3 utmp: no need to zero a struct before overwriting it with memcpy 2011-11-07 01:10:34 +01:00
Michal Schmidt
0ad26e09de utmp: remove unneded parameters
With these functions no caller ever passes anything else than 0
for 't' (meaning the current time will be used).
2011-11-07 01:09:53 +01:00
Lennart Poettering
4cbd9ecf45 update TODO 2011-11-03 19:55:36 +01:00
Lennart Poettering
353fa6a21a cgroup: immediately remove all cgroups which run empty
Some controllers have scaling problems when many empty cgroups exist.
Hence, as soon as we get a notification that a cgroup is empty, delete
it. This is also nice to keep the systemd-cgls output short.
2011-11-03 19:42:53 +01:00
Lennart Poettering
263653e103 Merge remote-tracking branch 'zbigniew/systemadm_changes' 2011-11-02 14:08:49 +01:00
Ran Benita
f5a613c03c bash-completion: rename file since it is no longer for systemctl only 2011-11-02 13:07:47 +01:00
Ran Benita
3cdbf916d3 bash-completion: add completions for systemd-loginctl
This script is straightforward and should give proper completions for
all of systemd-loginctl's verbs.
2011-11-02 13:07:43 +01:00
Ran Benita
8aea83c718 bash-completion: update with new verbs and arguments
Adds arguments --root= --runtime --no-legend.
Adds verbs link mask unmask reenable list-unit-files.
Also uses list-unit-files to make nicer enable and disable completions.

Rebased due to changes in systemctl.
2011-11-02 13:07:36 +01:00
Dexter Morgan
6fdae8a6a4 Add Mageia support
This patch adds support for the Mageia Linux distribution:
 http://www.mageia.org/

Mageia is a fork of Mandriva although some divergence has already occured
and thus inclusion of these changes upstream allow us to (hopefully)
migrate more rapidly to the new standard approaches systemd offers.
Indeed, we already use the preferred mechanism of OS identification via
the /etc/os-release file rather than a distro specific variation.

This patch mostly mirrors the patch added previously for Mandriva
support. In addition to those original authors, this patch was mostly
written by Dexter Morgan with help from Colin Guthrie and Eugeni Dodonov.
2011-11-02 02:16:39 +01:00
Lennart Poettering
25d6283acf update TODO 2011-11-01 23:53:15 +01:00
Tom Gundersen
87e75fddbb cryptsetup-generator: avoid ordering cycle on swap
Devices with random keys (swap), should not be ordered before local-fs.target,
as this creates a cycle with systemd-load-random-seed.service (and also it
does not make sense, a swap device is not a local-fs).
2011-11-01 23:42:41 +01:00
Lennart Poettering
fc8f0b5c9c units: drop [Install] section from remote-fs-pre.target
remote-fs-pre.target is not a unit a user should ever explicitly enable.
Instead services which need to hook before network mounts should pull it
in.
2011-11-01 22:29:48 +01:00
Lennart Poettering
7fc2a89a73 mount: order remote mounts after both network.target and remote-fs-pre.target
Since remote-fs-pre.target is optional we cannot count on it to order
remote mounts after network.target, so let's add that order explicitly
in addition to remote-fs-pre.target.

https://bugzilla.redhat.com/show_bug.cgi?id=749940
2011-11-01 22:28:59 +01:00
Lennart Poettering
6ddaf1ca4a cgroup: always recreate cgroup before we try to apply attributes
We might have trimmed the cgroup tree previously, hence don't trust our
own "realized" flag, always recreate cgroup tree before applying our
attributes to make sure this actually works out.

https://bugzilla.redhat.com/show_bug.cgi?id=749687
2011-11-01 22:02:36 +01:00
Lennart Poettering
f632a6634d initctl: don't use dbus connection after PID 1 got respawned
After reexec PID 1 our bus connection is invalidated. Hence don't try to
reuse it, just terminate so that when we are spawned the next time we
just get a new one.

Spotted by Marti Raudsepp.
2011-11-01 18:21:32 +01:00
Thomas Jarosch
7670e5a2aa condition: Fix file descriptor leak in test_capability()
Detected by cppcheck.
2011-11-01 17:02:32 +01:00
Tom Gundersen
7c2ec00930 random-seed: convert poolsize from bits to bytes
The problem was first noted in a bug report against Arch's initscripts.

Reported-by: Taylan Ulrich Bayırlı <taylanbayirli@gmail.com>
Reported-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-11-01 14:45:52 +01:00
Lennart Poettering
bb53abeb8c plymouth: fix ply proto endianess issues
Plymouth enforces LE even for the local Ply proto, hence we should do
the conversion properly for BE arch compat.

Tracked down by Harald Hoyer.

https://bugzilla.redhat.com/show_bug.cgi?id=744415
2011-11-01 14:20:31 +01:00
Lennart Poettering
b7f44df59a README: explain dependency on cgroups 2011-11-01 13:52:46 +01:00
Lennart Poettering
a6eb9147a8 update TODO 2011-11-01 13:52:43 +01:00
Zbigniew Jędrzejewski-Szmek
1c0a113fd3 systemctl: make list-unit-files output more economical
The first column is given the width of the widest entry,
if possible, otherwise all entries are ellipsized to fit
in ($COLUMNS - (width of second column)).

[ Added a few fixes, calculate state_cols too, respect '--no-legend',
  better handling of '--full' -- michich ]
2011-10-24 19:40:05 +02:00
Dave Reisner
74eeab044e systemctl-completion: always invoke with --no-legend
In the case of completion for the 'restart' verb, passing the invalid
unit name (the colums header) causes completion to cease functioning
entirely, with the error:

  Failed to issue method call: Unit name UNIT is not valid.

This adds a small wrapper function for systemctl which can have common
options added to it.
2011-10-19 08:14:13 +02:00
Jonathan Nieder
5a8d081c58 audit: do not complain if kernel lacks audit
When running on a kernel without audit support, systemd currently
writes a mysterious-sounding error to its log:

	systemd[1]: Failed to connect to audit log: Protocol not supported

Better to suppress the audit_open() failure message when (and only
when) it is due to running on a kernel without audit support, since in
this case the admin probably does not mind systemd not writing to the
audit log.  This way, more serious errors like ENOMEM and EACCES will
stand out more.
2011-10-17 21:04:59 +02:00
Tollef Fog Heen
e51db373c2 service: Drop rcN.d runlevels from SysV services that also exist in rcS.d
Services which claim to start in both rcN.d and rcS.d generate
loops which for some reason seems to usually end up with dbus not
starting and the whole machine being quite unhappy. We now rather
assume that if a service can be started in rcS, it should not also
start in rcN.d.

Fixes Debian bug #637037
2011-10-17 21:02:42 +02:00
Michal Schmidt
563ba9ea6e manager: fix a crash in isolating
HASHMAP_FOREACH is safe against the removal of the current entry, but
not against the removal of other entries. job_finish_and_invalidate()
can recursively remove other entries.

It triggered an assertion failure:
  Assertion 'j->installed' failed at src/manager.c:1218, function
  transaction_apply(). Aborting.

Fix the crash by iterating from the beginning when there is a
possibility that the iterator could be invalid.

It is O(n^2) in the worst case, but that's better than a crash.

https://bugzilla.redhat.com/show_bug.cgi?id=717325
2011-10-17 11:29:27 +02:00
Lennart Poettering
8f9b6cd9eb journal: automaticall reset location when the set of matches changes 2011-10-15 02:53:04 +02:00
Lennart Poettering
8725d60ae4 journal: implement seek to head/tail 2011-10-15 02:45:58 +02:00
Lennart Poettering
e892bd1797 journal: unify code for up and for down traversal 2011-10-15 01:38:44 +02:00
Lennart Poettering
de7b95cdc3 journal: properly implement matching with multiple matches 2011-10-15 01:13:37 +02:00
Lennart Poettering
1cc101f1e5 journal: if two entries match with everything but seqnums, they are still identical 2011-10-14 16:52:42 +02:00
Lennart Poettering
7210bfb370 journal: move field index from file into journal object 2011-10-14 05:38:40 +02:00
Lennart Poettering
ae2cc8efc1 journal: when the same entry is in two files, skip over them in sync 2011-10-14 05:34:19 +02:00
Lennart Poettering
c2373f848d journal: synchronize seqnum across files 2011-10-14 05:12:58 +02:00
Lennart Poettering
161e54f871 journal: fix field retrieval by name 2011-10-14 04:52:56 +02:00
Lennart Poettering
3fbf9cbb02 journal: implement parallel file traversal 2011-10-14 04:44:50 +02:00
Lennart Poettering
0ac38b7072 journal: implementation rotation 2011-10-13 05:19:35 +02:00
Lennart Poettering
250d54b5be journalctl: find journal files in right path 2011-10-12 05:29:08 +02:00
Lennart Poettering
69e5d42db0 journal: add cgroup path to entries 2011-10-12 05:28:39 +02:00
Lennart Poettering
ed49ef3f34 journal: place machin journals in machine specific subdirectories 2011-10-12 05:06:09 +02:00