Commit graph

1973 commits

Author SHA1 Message Date
Martin Pitt 139e533628 hostname: Allow comments in /etc/hostname
The hostname(1) tool allows comments in /etc/hostname. Introduce a new
read_hostname_config() in hostname-util which reads a hostname configuration
file like /etc/hostname, strips out comments, whitespace, and cleans the
hostname. Use it in hostname-setup.c and hostnamed and remove duplicated code.

Update hostname manpage. Add tests.

https://launchpad.net/bugs/1053048
2015-05-19 12:18:08 +02:00
Zbigniew Jędrzejewski-Szmek e88d8021ba man: explain UseDomains a bit more
https://bugs.freedesktop.org/show_bug.cgi?id=85397
2015-05-18 22:35:42 -04:00
Karel Zak 3519d230c8 fstab-generator: add x-systemd.requires and x-systemd.requires-mounts-for
Currently we have no way how to specify dependencies between fstab
entries (or another units) in the /etc/fstab. It means that users are
forced to bypass fstab and write .mount units manually.

The patch introduces new systemd fstab options:

x-systemd.requires=<PATH>

 - to specify dependence an another mount (PATH is translated to unit name)

x-systemd.requires=<UNIT>

 - to specify dependence on arbitrary UNIT

x-systemd.requires-mounts-for=<PATH ...>

 - to specify dependence on another paths, implemented by
   RequiresMountsFor=. The option may be specified more than once.

For example two bind mounts where B depends on A:

 /mnt/test/A    /mnt/test/A     none    bind,defaults
 /mnt/test/A    /mnt/test/B     none    bind,x-systemd.requires=/mnt/test/A

More complex example with overlay FS where one mount point depends on
"low" and "upper" directories:

 /dev/sdc1   /mnt/low    ext4     defaults
 /dev/sdc2   /mnt/high   ext4     defaults
 overlay     /mnt/merged overlay  lowerdir=/mnt/low,upperdir=/mnt/high/data,workdir=/mnt/high/work,x-systemd.requires-mounts-for=/mnt/low,x-systemd.requires-mounts-for=mnt/high

https://bugzilla.redhat.com/show_bug.cgi?id=812826
https://bugzilla.redhat.com/show_bug.cgi?id=1164334
2015-05-18 16:07:52 +02:00
Zbigniew Jędrzejewski-Szmek 903e7c37ca Use "new" --job-mode= option in more places
--irreversible/--ignore-dependencies/--fail are deprececated since 4dc5b821ae.

Also add shell completions for --jobs-mode.
2015-05-18 01:08:09 -04:00
Lennart Poettering 5470c03b37 coredump: make sure we vacuum by default
Only if both keep_free and max_use are actually 0 we can shortcut things
and avoid vacuuming. If either are positive or -1 we need to execute the
vacuuming.

http://lists.freedesktop.org/archives/systemd-devel/2015-April/031382.html
2015-05-15 20:56:55 +02:00
Benedikt Morbach 5c82dd13e1 man: IPMasquerade only implies IPForward=ipv4
at least that's what the code does.
2015-05-15 12:18:05 +02:00
Benedikt Morbach 505c5f6de1 networkd: don't touch global forwarding setting
This reverts commit 43c6d5abac
(and a small part of 4046d8361c)

It turns out we don't actually need to set the global ip_forward setting.
The only relevant setting is the one on each interface.

What the global toggle actually does is switch forwarding on/off for all
currently present interfaces and change the default for new ones.

That means that by setting the global ip_forward we

  - Introduce a race condition, because if the interface with IPForward=yes
    is brought up after one with IPForward=no, both will have forwarding
    enabled, because the global switch turns it on for all interfaces.
    If the other interface comes up first networkd correctly sets forward=0
    and it doesn't get overridden.

  - Change the forwarding setting for interfaces that networkd is not
    configured to touch, even if the user disabled forwarding via sysctl,
    either globally or per-interface

As forwarding works fine without this, as long as all relevant interfacest
individually set IPForward=yes:  just drop it

This means that non-networkd interfaces use the global default while
networkd interfaces default to off if IPForward isn't given.
2015-05-15 12:13:35 +02:00
Jan Synacek 57ab2eabb8 systemctl: introduce --now for enable, disable and mask
https://bugs.freedesktop.org/show_bug.cgi?id=42940
2015-05-15 11:59:36 +02:00
Lennart Poettering 5a8af538ae nspawn: rework custom mount point order, and add support for overlayfs
Previously all bind mount mounts were applied in the order specified,
followed by all tmpfs mounts in the order specified. This is
problematic, if bind mounts shall be placed within tmpfs mounts.

This patch hence reworks the custom mount point logic, and alwas applies
them in strict prefix-first order. This means the order of mounts
specified on the command line becomes irrelevant, the right operation
will always be executed.

While we are at it this commit also adds native support for overlayfs
mounts, as supported by recent kernels.
2015-05-13 14:07:26 +02:00
Torstein Husebø ff9b60f38b treewide: Correct typos and spell plural of bus consistent 2015-05-11 15:51:30 +02:00
Zbigniew Jędrzejewski-Szmek 7703bd4d28 man: fix typos in previous comimt 2015-05-09 19:46:23 -04:00
Zbigniew Jędrzejewski-Szmek 589532d0c6 man: document forwarding to syslog better
https://bugzilla.redhat.com/show_bug.cgi?id=1147651
2015-05-09 17:21:18 -04:00
Torstein Husebø e5f270f5d0 treewide: fix typos 2015-05-05 22:19:28 -04:00
Lennart Poettering 3fe22bb4b6 man: document that nspawn -x, --template= and machinectl clone leave hostname and machine id unmodified 2015-05-05 15:07:00 -07:00
Lennart Poettering 7de7ee62c5 man: nspawn is used in production these days, admit that
Previously, the man page suggested to only use nspawn for testing,
building, and debugging things. However, it is nowadays used in
production and used as building block for rocket, hence let's just admit
that it's pretty much production ready.
2015-05-05 15:07:00 -07:00
Stephen Gallagher be7d0048dd Add VARIANT as a standard value for /etc/os-release
Some distributions (such as Fedora) are using the VARIANT field to
indicate to select packages which of several default configurations
they should be using. For example, VARIANT=Server provides a
different default firewall configuration (blocking basically
everything but SSH and the management console) whereas
VARIANT=Workstation opens many other ports for application
compatibility.

By adding this patch to the manual pages, we can standardize on a
cross-distribution mechanism for accomplishing this.

Fedora implementation details are available at
https://fedoraproject.org/wiki/Packaging:Per-Product_Configuration

(David: drop double paranthesis)
2015-05-05 21:07:13 +02:00
Zbigniew Jędrzejewski-Szmek 35c0808fe0 man: use utf-8 in systemd-remount-fs.service(8) 2015-05-02 13:01:28 -04:00
Lennart Poettering 4a2af8d76f man: update sd_bus_open() documentation
Update for current function prototypes.

Also, document -ESOCKTNOSUPPORT as being returned when protocol version
mismatches are detected.
2015-04-30 01:52:39 +02:00
Susant Sahani 5cc0748e19 networkd: add man for vti6 tunnel 2015-04-29 21:54:00 +02:00
Lennart Poettering 882f407f31 man: document when the various sd-login.h calls return ENXIO 2015-04-29 21:45:58 +02:00
Lennart Poettering 52d7c4dcf1 man: document when the sd_bus_creds_xxx() calls return ENXIO 2015-04-29 21:45:58 +02:00
Lennart Poettering b53c3c2d24 man: avoid line break in url 2015-04-29 18:36:25 +02:00
Lennart Poettering 96d9117ad2 fsck: remove fsckd again, but keep the door open for external replacement
For a longer discussion see this:

http://lists.freedesktop.org/archives/systemd-devel/2015-April/030175.html

This introduces /run/systemd/fsck.progress as a simply
AF_UNIX/SOCK_STREAM socket. If it exists and is connectable we'll
connect fsck's -c switch with it. If external programs want to get
progress data they should hence listen on this socket and will get
all they need via that socket. To get information about the connecting
fsck client they should use SO_PEERCRED.

Unless /run/systemd/fsck.progress is around and connectable this change
reverts back to v219 behaviour where we'd forward fsck output to
/dev/console on our own.
2015-04-28 17:30:00 +02:00
Lennart Poettering 3d161f991e run: by default, wait until the transient unit finished start-up
Make this blocking behaviour optional with --no-block, similar to
systemctl's switch of this name.
2015-04-28 12:33:19 +02:00
Lennart Poettering a22e1850c3 man: clarify that only the first .network file with a matching [Match] matters
http://lists.freedesktop.org/archives/systemd-devel/2015-April/031294.html
2015-04-28 11:44:24 +02:00
Lennart Poettering 64b282ef71 man: document that nspawn's --bind= switch may be used multiple times 2015-04-27 15:40:30 +02:00
Lennart Poettering 4046d8361c man: extend documentation on IPForward= and IPMasquerade=
Mention the default values, and clarify how this relates to the
underlying sysctls.
2015-04-24 19:56:47 +02:00
Daniel Mack d6b07ef796 shutdownd: kill the old implementation
Not that all functionality has been ported over to logind, the old
implementation can be removed. There goes one of the oldest parts of
the systemd code base.
2015-04-24 17:48:12 +02:00
Lennart Poettering 85fb80317b man: fix example in systemd-run(1)
Reported by Holger Reif.
2015-04-22 22:56:24 +02:00
Lennart Poettering 6d785b6d07 man: elaborate on the order by which tmpfiles operations are executed 2015-04-22 18:24:47 +02:00
Lennart Poettering 3bd3150367 build-sys: move systemd.pc from pkgconfiglibdir back into pkgconfigdatadir
The original idea of systemd.pc was to contain arch-independent system
and systemd information. By exposing libdir as part of the fields (added
in eb39a6239c), it started to carry
arch-dependent data, thus breaking multilib systems. It was then moved
to pkgconfiglibdir to deal with this (in
aec432c613), but actually the right
approach is to simply not include libdir in the .pc file at all.

THis patch hence more or less reverts both commits again, and moves the
.pc file back into pkgconfigdatadir.

As alternative for querying the systems primary libdir there's now
"systemd-path system-library-arch", hence a more correct alternative
exists for querying this variable from the .pc file.
2015-04-21 20:35:17 +02:00
Michael Olbrich deb0a77cf0 automount: add expire support 2015-04-21 20:23:41 +02:00
Susant Sahani 38422da754 networkd man: fix man and config name.
Rename bond confs and man as well.

[tomegun: dropped a stray comma]
2015-04-21 11:17:37 +02:00
Susant Sahani 81bd37a85f networkd: Add support for bond option.
This patch adds configurational support for bond option.

Test conf:

bond.netdev

 ---
[NetDev]
Name=bond1
Kind=bond

[Bond]
ArpAllTargets=all
PrimaryReselect=better
ArpIntervalSec=10s
ArpIpTargets= 192.168.8.102 192.168.8.101 192.168.8.102
 ---

$cat /proc/net/bonding/bond1
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
ARP Polling Interval (ms): 10000
ARP IP target/s (n.n.n.n form): 192.168.8.100, 192.168.8.101, 192.168.8.102
2015-04-20 20:14:34 +02:00
Susant Sahani cffacc741c networkd vxlan: Add support for enabling UDP checksums
Add UDPCheckSum option to enable transmitting UDP checksums when doing
VXLAN/IPv4. Add UDP6ZeroChecksumRx, and UDP6ZeroChecksumTx
options to enable sending zero checksums and receiving zero
checksums in VXLAN/IPv6

[tomegun: rebase manpage due to whitespace changes]
2015-04-20 20:09:32 +02:00
Martin Pitt 4eac277367 cryptsetup: Implement offset and skip options
These are useful for plain devices as they don't have any metadata by
themselves. Instead of using an unreliable hardcoded device name in crypttab
you can then put static metadata at the start of the partition for a stable
UUID or label.

https://bugs.freedesktop.org/show_bug.cgi?id=87717
https://bugs.debian.org/751707
https://launchpad.net/bugs/953875
2015-04-17 10:53:01 -05:00
Lennart Poettering 1ae705fb3d man: slightly fewer paragraphs can help readability 2015-04-13 15:23:53 +02:00
Lennart Poettering bd1100898d man: fix examples indentation in tmpfiles.d(5) 2015-04-13 15:23:52 +02:00
Lennart Poettering 0ac0b1e720 man: add information about more lines to explanation of argument field 2015-04-13 15:23:52 +02:00
Lennart Poettering 6a9171d2ec man: document which tmpfiles line types follow symlinks
Generally, we will not follow symlinks, except for "w".

Avoid documentation for now for fifo, device node, directory lines,
which currently follow symlinks but better shouldn't.
2015-04-13 15:23:52 +02:00
Zbigniew Jędrzejewski-Szmek c268628a20 man: add link to glib in sd_event_run(3) 2015-04-12 21:47:58 -04:00
Lennart Poettering b90930c73b man: avoid confusion regarding "time synchronization state"
Also, update example in the timedatectl man page to match the actual
timedatectl output.
2015-04-08 18:34:08 +02:00
Zbigniew Jędrzejewski-Szmek d6a12e7ca3 man: remove 'fs' from 'rootfsflags'
rootfsflags does not appear anywhere else.
2015-04-08 11:28:45 -04:00
Jan Janssen 5bdf22430e logind,systemctl: add reboot to EFI firmware support 2015-04-07 18:51:45 +02:00
Richard Maw 6b94875fa3 man: fix typos in machinectl
The s/now/not/ unfortunately inverted the meaning.
2015-04-07 16:54:44 +02:00
Richard Maw f8b07704b8 man: Resolve how to refer to derived names for machinectl containers
"the name it is" is clumsy english, and since the most recently referred
to thing was a name anyway we can just leave the "it is".

This matches later uses in the same document.
2015-04-07 16:54:41 +02:00
Lennart Poettering 2fc4f5bd92 timedatectl: avoid specifically referring to NTP
systemd-timesyncd not only does NTP, but also manages clock monotonicity
using a flags file. In future, it might learn PTP support. Hence don't
expose its enablement state as "NTP" but use the more generic term
"network time synchronization". After all, for similar reasons
systemd-timesyncd is not called systemd-ntpd.
2015-04-07 16:43:37 +02:00
Lennart Poettering 57506e7d18 man: update timedatectl(1)'s examples
The output didn't match what we output these days. Also, "set-ntp"
cannot be used to control chronyd anymore.
2015-04-07 16:29:42 +02:00
Lennart Poettering ff5921bae2 man: document in timedatectl(1) that the NTP state shown reflects whether timesyncd is enabled 2015-04-07 16:23:16 +02:00
Lennart Poettering f5a05fb578 man: document default timeouts and start limit parameters 2015-04-07 15:42:25 +02:00