Commit graph

380 commits

Author SHA1 Message Date
Lennart Poettering 4771148bb9 units: exclude gettys from isolate requests
gettys are nowadays mostly autospawned and hence usually subject to
being shut down on isolate requests, since they are no dependency of any
other unit. This is a bad idea if the user isolates between
multi-user.graphical and graphical.target, hence exclude them from the
isolation.

This has the effect that gettys no longer cleaned up when
emergency.target is isolated, which might actualy be considered a
feature, even though it is a change from previous behaviour...

Note that the one getty that really matters (the one on tty1) is still
removed when isolating to emergency.target since it conflicts with
emergency.service.
2012-04-11 22:37:48 +02:00
Kay Sievers 635f7d8ca7 enable proper access timestamps on all tmpfs mounts 2012-04-11 22:18:55 +02:00
Lennart Poettering 082694b75f units: introduce nss-user-lookup.target
This separates user/group NSS lookups from host/network NSS lookups.

By default order all network mounts after host/network NSS lookups now,
and logind execution after user/group NSS lookups.
2012-04-11 00:11:18 +02:00
Lennart Poettering 704179d839 units: direct users to the journal for logs when entering rescue mode 2012-04-04 13:52:02 +02:00
Dave Reisner 9cf2578683 units/: use @SYSTEMCTL@ instead of hardcoded paths
Especially in the case of --enable-split-usr, several units will point
to the wrong location for systemctl. Use @SYSTEMCTL@ which will always
contain the proper path.
2012-04-04 06:46:35 +02:00
Kay Sievers 3672af61aa udev: fix path in udev.service 2012-04-04 06:21:23 +02:00
Kay Sievers 3e2147858f move imported udev into place 2012-04-04 05:05:07 +02:00
Kay Sievers 623ac9d2fc units: mount /tmp as tmpfs
The default setups should be a stateless as possible. /tmp as tmpfs is
the intended default for general purpose systems.

Small temporary files should not be stored on disk; lager files, or
files which should potentially survive a reboot, belong into /var/tmp.

Also catch up with some good old UNIX history.

More details are here:
  https://fedoraproject.org/wiki/Features/tmp-on-tmpfs
2012-03-27 17:30:41 +02:00
Lennart Poettering 55d029addf units: get rid of var-run.mount and var-lock.mount
Since a number of distribitions don't need this compat glue anymore drop
it from systemd upstream. Distributions which still haven't converted
to /run can steal these unit files from the git history if they need to.
2012-03-27 17:11:00 +02:00
Lennart Poettering 231931ffba units: don't mount tmpfs on /media anymore
udisks2 doesn't use /media anymore, instead mounts removable media in a
user-private directory beneath /run. /media is hence mostly obsolete and
hence it makes little sense to continue to mount a tmpfs to it.

Distributions should consider dropping the mount point entirely since
nothing uses it anymore.
2012-03-27 17:04:22 +02:00
Roberto Sassu 160481f68d systemd: mount the securityfs filesystem at early stage
This is an S/MIME signed message

The mount of the securityfs filesystem is now performed in the main systemd
executable as it is used by IMA to provide the interface for loading custom
policies. The unit file 'units/sys-kernel-security.mount' has been removed
because it is not longer necessary.

Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Acked-by: Gianluca Ramunno <ramunno@polito.it>
2012-03-22 00:20:48 +01:00
Lennart Poettering 54ecda32c6 socket: add option for SO_PASSEC
https://bugzilla.redhat.com/show_bug.cgi?id=798760

(Note that this work is not complete yet, as the kernel seems to send us
useless data with SCM_SECURITY enabled)
2012-03-13 00:00:27 +01:00
Lennart Poettering eb91400c68 units: reword rescue/emergency mode message to fit in 80chars 2012-02-15 20:06:14 +01:00
Lennart Poettering cabca20b1a journal: add CAP_SETUID and CAP_SETGID to capabilities for journald, so that we can fake SCM_CREDENTIALS 2012-02-10 15:46:24 +01:00
Lennart Poettering 353e12c2f4 service: ignore SIGPIPE by default 2012-02-09 03:18:04 +01:00
Lennart Poettering ccd07a083e journal: limit caps we pass to journald 2012-02-09 02:06:13 +01:00
Kay Sievers e0d25329b2 move /usr/bin/systemd to /usr/lib/systemd/systemd 2012-02-08 00:08:10 +01:00
Mike Kazantsev 9c07474c6f logind: add sys_tty_config capability, to let it use VT_ACTIVATE ioctl on "activate" action 2012-01-27 21:14:01 +01:00
Lennart Poettering bb99a35a87 log: increase socket buffers for logging by default 2012-01-27 18:57:37 +01:00
Lennart Poettering 4cfa2c999d core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
Lennart Poettering ead51eb4ed units: make sure syslog socket goes away early during shutdown 2012-01-12 04:34:50 +01:00
Lennart Poettering 6342c8eaaf units: remove left-over unit file 2012-01-06 03:20:22 +01:00
Lennart Poettering ba1d559635 journald: start the journal after the syslog socket, so that the syslog socket queues syslog messages from early boot on 2012-01-06 03:11:56 +01:00
Lennart Poettering 4c0bebc335 kmsg-syslogd: remove kmsg-syslogd, since it's entirely obsoleted and replaced by journald 2012-01-06 03:11:17 +01:00
Lennart Poettering db5973704b stdout: remove stdout-syslog-bridge since it is now obsoleted by journald 2012-01-06 02:48:38 +01:00
Lennart Poettering 259d2e7620 journal: move sockets into their own subdir 2012-01-05 20:24:16 +01:00
Lennart Poettering 271b032a05 socket: rename the PassCred= option to PassCredentials=, since we don't want to needlessly abbreviate options unless they are very well established 2011-12-31 01:07:49 +01:00
Lennart Poettering dc1ecd78e9 Merge branch 'journal' 2011-12-31 00:59:37 +01:00
Lennart Poettering 8b18eb674c journald: forward all syslog messages to syslogd 2011-12-30 19:05:43 +01:00
Lennart Poettering 4b2d99d9f4 journal: add unit files and shared library glue 2011-12-30 17:50:37 +01:00
Michal Schmidt 91b684c730 rc-local: order after network.target
As suggested by Bill Nottingham: rc.local is often used for frobbing the
network.

https://bugzilla.redhat.com/show_bug.cgi?id=754789
2011-12-02 11:32:52 +01:00
Michal Schmidt e951701a4d rc-local: no need to check if the script is executable
rc-local.service is pulled in by a generator only if the script is
executable. No need to check again.
2011-12-02 11:32:04 +01:00
Michal Schmidt 1567308317 add a generator to pull rc-local.service in
rc-local.service acts as an ordering barrier even if its condition is
false, because conditions are evaluated when the service is about to be
started.

To avoid the ordering barrier in a legacy-free system, add a generator
to pull rc-local.service into the transaction only if the script is
executable.

If/when we rewrite SysV compatibility into a generator, this one can become
a part of it.
2011-12-02 11:29:48 +01:00
Michal Schmidt 1a2801529e syslog: use PassCred=yes for the /dev/log socket
Both kmsg-syslogd and the real syslog service want to receive
SCM_CREDENTIALS. With socket activation it is too late to set
SO_PASSCRED in the services.
2011-11-30 11:00:28 +01:00
Michal Schmidt 75d3fc60f8 shutdownd: use PassCred=yes in the socket unit
Since Linux 3.2 in order to receive SCM_CREDENTIALS it is not sufficient
to set SO_PASSCRED just before recvmsg(). The option has to be already
set when the sender sends the message.

With socket activation it is too late to set the option in the service.
It must be set on the socket right from the start.

See the kernel commit:
16e57262 af_unix: dont send SCM_CREDENTIALS by default

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=757628
2011-11-30 10:12:59 +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
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 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 822b18599d units: forgot target units 2011-10-11 14:26:20 +02:00
Lennart Poettering f84aea434f units: increase LimitNOFILE a bit
since we need one fd per session (for logind) and one fd per service
(for stdout-syslog-bridge) increase the default rlimit a bit.
2011-10-11 04:43:29 +02:00
Lennart Poettering 8266f984df units: remount root and API FS before all mount units are applied
In order to ensure that bind mounts copy the final mount settings to the
new bind mount make the root and API FS mount options are applied before
the other file systems are mounted.

https://bugzilla.redhat.com/show_bug.cgi?id=718464
2011-10-11 03:41:04 +02:00
Lennart Poettering a966a504e8 readahead: opt out of bridge logging for readahead in order not to delay things unnecessarily 2011-09-23 17:42:54 +02:00
Michal Schmidt 0fe9972f3c units: fix rescue.service race with plymouth
It was possible for the "ExecStartPre=-/bin/plymouth quit" to race
with plymouth-start.service which is pulled in indirectly by
basic.target -> sysinit.target.

The race left plymouth running on the terminal, making it unusable for
rescue purposes.

https://bugzilla.redhat.com/show_bug.cgi?id=710487
2011-09-22 23:59:50 +02:00
Lennart Poettering 7ef5875d14 units: introduce unit file for FUSE fs
FUSE and configfs is very very similar, so handle both the same way.
2011-09-22 03:00:04 +02:00
Marko Saukko d418f857f8 units: In MeeGo there was more than one ExecStart lines present that caused systemd to refuse the rescue.service 2011-09-21 21:38:46 +02:00
Lennart Poettering 4f38cd85f6 units: we don't need to check whether /sys/kernel/security is already mounted since we'll enumerate that fact anyway 2011-09-21 18:06:24 +02:00
Lennart Poettering ac0a983ac6 units: drop automount unit for /dev/hugepages
Since hugetlbfs cannot be compiled as kernel module there's little point
in doing on-demand mounting via autofs for it.
2011-09-21 03:56:56 +02:00
Lennart Poettering 1f2c94a487 units: drop automount unit for /dev/mqueue
Since the mqueue support cannot be built as a module there's little
benefit in having an autofs mount point set up for this.
2011-09-21 03:56:56 +02:00