Commit graph

3174 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 4bc5d27b94 Drop busname unit type
Since busname units are only useful with kdbus, they weren't actively
used. This was dead code, only compile-tested. If busname units are
ever added back, it'll be cleaner to start from scratch (possibly reverting
parts of this patch).
2017-07-23 09:29:02 -04:00
Zbigniew Jędrzejewski-Szmek e5f752082e build-sys: drop gitignore patterns for in-tree builds
... and other autotools-generated files.
2017-07-18 10:05:06 -04:00
Zbigniew Jędrzejewski-Szmek 0689f766dc build-sys: drop support for generation of Makefile-man.am 2017-07-18 10:04:44 -04:00
Zbigniew Jędrzejewski-Szmek 72cdb3e783 build-sys: drop automake support
v2:
- also mention m4
2017-07-18 10:04:44 -04:00
Yu Watanabe 3536f49e8f core: add {State,Cache,Log,Configuration}Directory= (#6384)
This introduces {State,Cache,Log,Configuration}Directory= those are
similar to RuntimeDirectory=. They create the directories under
/var/lib, /var/cache/, /var/log, or /etc, respectively, with the mode
specified in {State,Cache,Log,Configuration}DirectoryMode=.

This also fixes #6391.
2017-07-18 14:34:52 +02:00
Lennart Poettering e758bc9132 Merge pull request #6387 from keszybz/fix-timeout-0
Fix x-systemd.timeout=0 in fstab
2017-07-18 00:04:24 +02:00
Zbigniew Jędrzejewski-Szmek b2a1a5c76c man: make crypttab(5) a bit easier to read 2017-07-17 16:03:24 -04:00
Lennart Poettering 7398320f9a Merge pull request #6328 from yuwata/runtime-preserve
core: Allow preserving contents of RuntimeDirectory over process restart
2017-07-17 10:02:19 +02:00
Yu Watanabe 23a7448efa core: support subdirectories in RuntimeDirectory= option 2017-07-17 16:30:53 +09:00
Yu Watanabe 53f47dfc7b core: allow preserving contents of RuntimeDirectory= over process restart
This introduces RuntimeDirectoryPreserve= option which takes a boolean
argument or 'restart'.

Closes #6087.
2017-07-17 16:22:25 +09:00
Lucas Werkmeister ceabfb889d Fix spelling (#6378) 2017-07-15 12:29:09 -04:00
Susant Sahani b2392ff31c journald: make reading /dev/kmsg optional (#6362)
Closes #6022
2017-07-15 13:57:52 +02:00
Lennart Poettering 6297d07b82 Merge pull request #6300 from keszybz/refuse-to-load-some-units
Refuse to load some units
2017-07-12 09:28:20 +02:00
Zbigniew Jędrzejewski-Szmek b023856884 man: add warnings that Private*= settings are not always applied 2017-07-11 13:38:13 -04:00
Colin Walters 634735b56b fstab-generator: Chase symlinks where possible (#6293)
This has a long history; see see 5261ba9018
which originally introduced the behavior.  Unfortunately that commit
doesn't include any rationale, but IIRC the basic issue is that
systemd wants to model the real mount state as units, and symlinks
make canonicalization much more difficult.

At the same time, on a RHEL6 system (upstart), one can make e.g. `/home` a
symlink, and things work as well as they always did; but one doesn't have
access to the sophistication of mount units (dependencies, introspection, etc.)
Supporting symlinks here will hence make it easier for people to do upgrades to
RHEL7 and beyond.

The `/home` as symlink case also appears prominently for OSTree; see
https://ostree.readthedocs.io/en/latest/manual/adapting-existing/

Further work has landed in the nspawn case for this; see e.g.
d944dc9553

A basic limitation with doing this in the fstab generator (and that I hit while
doing some testing) is that we obviously can't chase symlinks into mounts,
since the generator runs early before mounts. Or at least - doing so would
require multiple passes over the fstab data (as well as looking at existing
mount units), and potentially doing multi-phase generation. I'm not sure it's
worth doing that without a real world use case. For now, this will fix at least
the OSTree + `/home` <https://bugzilla.redhat.com/show_bug.cgi?id=1382873> case
mentioned above, and in general anyone who for whatever reason has symlinks in
their `/etc/fstab`.
2017-07-11 18:48:57 +02:00
Lennart Poettering 565dab8ef4 man: briefly document permitted user/group name syntax for User=/Group= and syusers.d (#6321)
As discussed here:

https://lists.freedesktop.org/archives/systemd-devel/2017-July/039237.html
2017-07-10 13:44:06 -04:00
Yu Watanabe 3747daa2e5 systemd-mount: support unmounting devices on remote host
The commit 9017f5d88d prohibits
to unmount devices on remote host. This makes reenable such feature.
2017-07-05 21:55:39 +09:00
Yu Watanabe f0aac575fc systemd-mount: support discovery of loop backing file
```
$ suro systemd-mount /path/to/disk.img
Started unit run-media-system-disk.img.mount for mount point: /run/media/system/disk.img
```

Closes #6226.
2017-07-05 21:54:40 +09:00
NeilBrown 65e1dee7dc fstab-generator: handle NFS "bg" mounts correctly. (#6103)
When "bg" is specified for NFS mounts, and if the server is
not accessible, two behaviors are possible depending on networking
details.
If a definitive error is received, such a EHOSTUNREACH or ECONNREFUSED,
mount.nfs will fork and continue in the background, while /bin/mount
will report success.
If no definitive error is reported but the connection times out
instead, then the mount.nfs timeout will normally be longer than the
systemd.mount timeout, so mount.nfs will be killed by systemd.

In the first case the mount has appeared to succeed even though
it hasn't.  This can be confusing.  Also the background mount.nfs
will never get cleaned up, even if the mount unit is stopped.

In the second case, mount.nfs is killed early and so the mount will
not complete when the server comes back.

Neither of these are ideal.

This patch modifies the options when an NFS bg mount is detected to
force an "fg" mount, but retain the default "retry" time of 10000
minutes that applies to "bg" mounts.
It also imposes "nofail" behaviour and sets the TimeoutSec for the
mount to "infinity" so the retry= time is allowed to complete.
This provides near-identical behaviour to an NFS bg mount started directly
by "mount -a".  The only difference is that systemd will not wait for
the first mount attempt, while "mount -a" will.

Fixes #6046
2017-07-04 09:47:40 +02:00
Zbigniew Jędrzejewski-Szmek 25fb19da67 man: remove unnecessary "the" 2017-07-03 10:33:42 -04:00
Lennart Poettering 939ae460cd Merge pull request #6231 from keszybz/man-nss-resolved
man: describe the relationship between nss-myhostname and nss-resolved
2017-07-03 16:11:16 +02:00
Lennart Poettering e634bca681 Merge pull request #6233 from keszybz/man-locale-vconsole
Small doc updates for 00-keyboard.conf, vconsole.conf, locale.conf
2017-07-03 11:40:42 +02:00
Zbigniew Jędrzejewski-Szmek f518ee04d7 man: add zypper instructions for systemd-nspawn
v2:
- add -c and update the list of packages
v3:
- link to a man page on mankier.com
2017-07-02 19:11:48 -04:00
Zbigniew Jędrzejewski-Szmek fa0c9e6315 man: add more detail about quoting in ExecStart lines
Fixes #624.
2017-06-30 10:00:13 -04:00
Lars Karlitski 78c1edd1ef man: fix spelling error of sd_bus_error_set_const (#6246) 2017-06-30 11:57:13 +02:00
Zbigniew Jędrzejewski-Szmek 8968e36f21 man: mention localed and localectl in locale.conf(5) and vconsole.conf(5)
Fixes #295.

(We cannot add a comment to either of those files because they are documented
to "only support variable assignments", so it's better to add an explanation
in the man page instead.)
2017-06-28 22:47:55 -04:00
Zbigniew Jędrzejewski-Szmek 2b015ea4b2 man: describe the relationship between nss-myhostname and nss-resolved
Fixes #1605.
2017-06-28 20:43:37 -04:00
Yu Watanabe 6f6165bf7d systemd-mount: support unmounting loop devices by backing files (#6211)
This makes `systemd-umount` or `systemd-mount -u` support unmounting
loop devices by the corresponding backing files, like
`systemd-mount --umount /tmp/foo.img /tmp/bar.img`

Fixes #6206.
2017-06-28 14:19:38 -04:00
Lennart Poettering cd2dfc6fae nspawn: register a scope for the unit if --register=no is specified (#6166)
Previously, only when --register=yes was set (the default) the invoked
container would get its own scope, created by machined on behalf of
nspawn. With this change if --register=no is set nspawn will still get
its own scope (which is a good thing, so that --slice= and --property=
take effect), but this is not done through machined but by registering a
scope unit directly in PID 1.

Summary:

--register=yes             → allocate a new scope through machined (the default)
--register=yes --keep-unit → use the unit we are already running in an register with machined
--register=no              → allocate a new scope directly, but no machined
--register=no --keep-unit  → do not allocate nor register anything

Fixes: #5823
2017-06-28 13:22:46 -04:00
Lennart Poettering 2eb6ff5e71 man: extend Before=/After= documentation a bit
let's clarify what the order actually means for service units.

Fixes: #6097
2017-06-27 21:30:48 +02:00
Lennart Poettering 80af263b6c man: improve documentation of ExecStartPost= a bit
Let's make clear what start-up really means in this case.

See: #6097
2017-06-27 21:30:48 +02:00
Lennart Poettering 23254af18d man: be more precise on the ConditionFirstBoot= documentation
Fixes: #5696
2017-06-27 21:30:48 +02:00
Zbigniew Jędrzejewski-Szmek 180f6dbd2c Merge pull request #6067 from ssahani/networkctl
networkctl: display address labels
2017-06-27 11:41:09 -04:00
Zbigniew Jędrzejewski-Szmek a5be8dabd6 Add networkctl label to man and shell completion 2017-06-27 10:30:41 -04:00
Janne Heß 259d1af8d6 doc: Add an example for target units (#5951)
This adds an example target unit to the man page of systemd targets.

Closes #67.
2017-06-27 09:50:28 +02:00
Evgeny Vereshchagin 82891136d7 Merge pull request #6160 from poettering/non-pollable-fdstore
support for non-pollable fds in the service fdstore
2017-06-27 00:22:58 +03:00
Yu Watanabe 9017f5d88d systemd-mount: support device names and multiple arguments for umount (#6096)
This makes systemd-umount (or systemd-mount -u) supports multiple arguments
which can be path, device, or fstab style node name, like
`systemd-umount /path/to/umount /dev/sda1 UUID=xxxxxx-xxxx LABEL=xxxxx`.

C.f. https://github.com/systemd/systemd/pull/5235#issuecomment-277731314.
2017-06-26 16:07:07 -04:00
Lennart Poettering 3ceb72e558 core: permit FDSTORE=1 messages with non-pollable fds
This also alters the documentation to recommend memfds rather than /run
for serializing state across reboots. That's because /run doesn't
actually have the same lifecycle as the fd store, as it is cleared out
on restarts.

Fixes: #5606
2017-06-26 15:14:41 +02:00
Susant Sahani 593022fa37 systemd-link: add support to configure the device port (#6153)
This work allows to configure device port:

tp — An Ethernet interface using Twisted-Pair cable as the medium.
aui — Attachment Unit Interface (AUI). Normally used with hubs.
bnc — An Ethernet interface using BNC connectors and co-axial cable.
mii — An Ethernet interface using a Media Independent Interface (MII).
fibre — An Ethernet interface using Optical Fibre as the medium.
2017-06-25 18:42:57 -04:00
Zbigniew Jędrzejewski-Szmek 7e867138f5 Merge pull request #5600 from fbuihuu/make-logind-restartable
Make logind restartable.
2017-06-24 18:58:36 -04:00
Waldemar Brodkorb e7e11bbf34 make nss-systemd support conditional (#6155)
This allows the nss-systemd module to be disabled on minimal installations.
2017-06-24 13:30:26 -04:00
Lennart Poettering 6c223c6719 Merge pull request #6113 from keszybz/shell-quoting
Use "dollar-single-quotes" to escape shell-sensitive strings
2017-06-20 20:17:03 +02:00
Zbigniew Jędrzejewski-Szmek 804ee07c13 Use "dollar-single-quotes" to escape shell-sensitive strings
Also called "ANSI-C Quoting" in info:(bash) ANSI-C Quoting.

The escaping rules are a POSIX proposal, and are described in
http://austingroupbugs.net/view.php?id=249. There's a lot of back-and-forth on
the details of escaping of control characters, but we'll be only using a small
subset of the syntax that is common to all proposals and is widely supported.
Unfortunately dash and fish and maybe some other shells do not support it (see
the man page patch for a list).

This allows environment variables to be safely exported using show-environment
and imported into the shell. Shells which do not support this syntax will have
to do something like
    export $(systemctl show-environment|grep -v '=\$')
or whatever is appropriate in their case. I think csh and fish do not support
the A=B syntax anyway, so the change is moot for them.

Fixes #5536.

v2:
- also escape newlines (which currently disallowed in shell values, so this
  doesn't really matter), and tabs (as $'\t'), and ! (as $'!'). This way quoted
  output can be included directly in both interactive and noninteractive bash.
2017-06-19 19:39:43 -04:00
Zbigniew Jędrzejewski-Szmek 189cd8c2ab man: describe RuntimeDirectoryMode=
Fixes #5509.
2017-06-17 15:23:02 -04:00
Pat Riehecky 42d3bf86bb man: systemd-timesyncd.service(8) (#6109)
Updates the documentation to note use of SNTP (resolves #5735)
2017-06-09 18:48:25 -04:00
Franck Bui 9b1419111a core: only apply NonBlocking= to fds passed via socket activation
Make sure to only apply the O_NONBLOCK flag to the fds passed via socket
activation.

Previously the flag was also applied to the fds which came from the fd store
but this was incorrect since services, after being restarted, expect that these
passed fds have their flags unchanged and can be reused as before.

The documentation was a bit unclear about this so clarify it.
2017-06-06 22:42:50 +02:00
Martin Pitt 5304b4ea72 Merge pull request #6058 from keszybz/chrooted-test-fixes
Chrooted test fixes
2017-06-01 09:37:13 +02:00
Yu Watanabe ff5d2cd03d man: update sd_get_seats(3) 2017-05-31 19:24:47 -04:00
Zbigniew Jędrzejewski-Szmek bc9e9af137 sd-login: translate -ENOMEDIUM to -ENODATA
The -ENOMEDIUM return value was introduced in v232-1001-g2977724b09,
('core: make hybrid cgroup unified mode keep compat /sys/fs/cgroup/systemd hierarchy'),
and would be returned by cg_pid_get_path_shifted(), but the documented and
expected return value is -ENODATA. Let's just catch ENXIO/ENOMEDIUM and translate
it to ENODATA in all cases.

Complements 171f8f591f, fixes #6012.
2017-05-30 21:17:46 -04:00
Zbigniew Jędrzejewski-Szmek 03c3c52040 man: update MemoryDenyWriteExecute description for executable stacks
Without going into details, mention that libraries are also covered by the
filters, and that executable stacks are a no no.

Closes #5970.
2017-05-30 16:44:48 -04:00