Commit graph

2968 commits

Author SHA1 Message Date
Martin Pitt d2697a95fe Merge pull request #5223 from keszybz/root-workdir
Fix WorkDir=~ with empty User=
2017-02-05 22:31:02 +01:00
Zbigniew Jędrzejewski-Szmek d20a328f97 build-sys,man: describe systemd-umount and hook it up to installation (#5227) 2017-02-05 22:27:38 +01:00
Martin Pitt 63927b9f4c man: clarify interface for suspend/resume integration (#5220)
Fixes #4916.
2017-02-03 12:11:37 -05:00
Zbigniew Jędrzejewski-Szmek 8b89628a10 core/execute: set HOME, USER also for root users
This changes the environment for services running as root from:

LANG=C.utf8
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
INVOCATION_ID=ffbdec203c69499a9b83199333e31555
JOURNAL_STREAM=8:1614518

to

LANG=C.utf8
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
HOME=/root
LOGNAME=root
USER=root
SHELL=/bin/sh
INVOCATION_ID=15a077963d7b4ca0b82c91dc6519f87c
JOURNAL_STREAM=8:1616718

Making the environment special for the root user complicates things
unnecessarily. This change simplifies both our logic (by making the setting
of the variables unconditional), and should also simplify the logic in
services (particularly scripts).

Fixes #5124.
2017-02-03 11:49:22 -05:00
Lennart Poettering b415174d8e Merge pull request #5202 from keszybz/cgls-units
systemd-cgls --unit --user-unit
2017-02-02 11:45:51 +01:00
Zbigniew Jędrzejewski-Szmek e7aa3f5014 cgls: add --user-unit to show user units 2017-02-01 22:31:41 -05:00
Zbigniew Jędrzejewski-Szmek d9855d87eb cgls: add --unit to show units
$ systemd-cgls -u systemd-journald.service machine.slice

I opted for a "global" switch, instead of modifying the behaviour of just one
argument. It seem to be a more useful setting, since usually one will want to
query one or more units, and not mix unit names with paths.

Closes #5156.
2017-02-01 22:30:03 -05:00
Brandon Philips 9806301614 man: fix spelling error parth -> path 2017-02-02 00:54:42 +01:00
Zbigniew Jędrzejewski-Szmek bef19548a2 systemctl: restore --failed (#5198)
'systemctl --failed' is an extremely common operation and it's nice to have
a shortcut for it.

Revert "man: don't document systemctl --failed" and add the option back to
systemctl's help and shell completion scripts.

This reverts commit 036359ba8d.
2017-02-02 00:23:46 +01:00
Zbigniew Jędrzejewski-Szmek c954f33233 man: mention ConditionFirstBoot= in systemd-firstboot(1) (#5186) 2017-01-31 08:25:19 +01:00
Rike-Benjamin Schuppner b03ec00960 man: fix flag in systemd-run (#5107) 2017-01-20 03:10:30 +03:00
Jakub Wilk 301a21a880 man: fix typos (#5109) 2017-01-19 16:54:22 +01:00
Zbigniew Jędrzejewski-Szmek 5b3637b44a Merge pull request #4991 from poettering/seccomp-fix 2017-01-17 23:10:46 -05:00
AsciiWolf 542ca7c9d2 man: fix typo (#5093) 2017-01-17 12:09:38 +01:00
Zbigniew Jędrzejewski-Szmek 6b3d378331 Merge pull request #4879 from poettering/systemd 2017-01-14 21:29:27 -05:00
Mark Stosberg ab8864ebc3 man: provide a basic guide to the systemctl status output (#4950)
- Show example of all `systemctl status` output and documents what possible
   "Loaded:", "Active" and "Enabled" values mean.

 - Documents what different colors of the dot mean.

 - Documents "gotcha" with load-on-demand behavior which will report units as
   "loaded" even if they are only loaded to show their status.
   (From @poettering: https://github.com/systemd/systemd/issues/5063#issuecomment-272115024 )
2017-01-14 17:43:32 -05:00
Lennart Poettering e843b04ee9 Merge pull request #5069 from keszybz/fixlets
Small fixes and enhancements to docs and code
2017-01-12 10:19:30 +01:00
Zbigniew Jędrzejewski-Szmek 9a4bf1e8d3 man: link to sd-j-{remote,upload} from journalctl(1) 2017-01-11 16:37:35 -05:00
Zbigniew Jędrzejewski-Szmek 374e692252 Merge pull request #5009 from ian-kelling/ian-mnt-namespace-doc 2017-01-11 15:23:00 -05:00
micah 6539dd7c42 Document how restart actions work (#5052)
When a user is trying to understand what is going on with a restart action, it is useful to explicitly describe how the action is run. It may seem obvious, but it is helpful to be explicit so one knows there isn't a special ExecRestart= or similar option that they could be looking at.
2017-01-11 15:07:35 -05:00
Zbigniew Jędrzejewski-Szmek c65aafbb33 man: add more links to systemd-ask-password and systemd-tty-ask-password-agent
Loosely inspired by https://bugzilla.redhat.com/show_bug.cgi?id=1411134.
2017-01-11 12:11:42 -05:00
Lennart Poettering 84e6712f94 Merge pull request #5046 from stefanha/vsock
Add AF_VSOCK socket activation support
2017-01-11 10:53:59 +01:00
Stefan Hajnoczi 359a5bcf78 core: add AF_VSOCK support to socket units
Accept AF_VSOCK listen addresses in socket unit files.  Both guest and
host can now take advantage of socket activation.

The QEMU guest agent has recently been modified to support socket
activation and can run over AF_VSOCK with this patch.
2017-01-10 15:29:04 +00:00
(GalaxyMaster) 23d0fff78d socket-proxyd: fix --connections-max help message and docs (#5044) 2017-01-10 08:55:50 +01:00
Ian Kelling fa2a396620 doc: MountFlags= don't reference container which may not exist (#5011) 2017-01-03 21:32:31 +01:00
Ian Kelling 7141028d30 doc: correct "or" to "and" in MountFlags= description (#5010) 2017-01-03 21:31:20 +01:00
Ian Kelling 4b957756b8 man: document mount deletion between commands 2017-01-03 02:17:50 -08:00
Martin Pitt 56a9366d7d Merge pull request #4994 from poettering/private-tmp-tmpfiles
automatically clean up PrivateTmp= left-overs in /var/tmp on next boot
2016-12-29 11:18:38 +01:00
Lennart Poettering 9eb484fa40 man: add brief documentation for the (sd-pam) processes created due to PAMName= (#4967)
A follow-up for #4942, adding a brief but more correct explanation of
the processes.
2016-12-29 10:55:27 +01:00
Lennart Poettering d71f050599 core: implicitly order units with PrivateTmp= after systemd-tmpfiles-setup.service
Preparation for fixing #4401.
2016-12-27 23:25:24 +01:00
Lennart Poettering 7f129a1f7c man: document that "systemd-run -M" propagates exit codes, and "machinectl shell" does not
This adds a brief explanation, suggesting the use of "systemd-run -M" to
acquire exit status/code information for the invoked process.

My original plan was to propagate the exit code/status in "machinectl
shell" too, but this would mean we'd have to actively watch the shell's
runtime status, and thus would need full, highly privileged and
continious access to the container's system manager, the way
"systemd-run" does it. This would be quite a departure from the
simplistic, low-priviliged OpenShell() bus call implementation of the
current code, that really just acquires a PTY device with a shell
connected.

Moreover it would blur the lines between the two commands even further,
which I think is not desirable. Hence, from now on:

    "machinectl shell" is the full-session, interactive shell for human
    users

    "systemd-run -M …" is the low-level tool, that supports
    on-interactive mode, and is more configurable and suitable for
    streaming.

Fixes: #4215
2016-12-27 18:32:45 +01:00
Lennart Poettering bd2ab3f4f6 seccomp: add two new filter sets: @reboot and @swap
These groupe reboot()/kexec() and swapon()/swapoff() respectively
2016-12-27 18:09:37 +01:00
Lucas Werkmeister 2dcf2a1724 man: minor improvements (#4981) 2016-12-25 12:14:00 +01:00
Felipe Sateler 99479986ea man: Align ExecStop= documentation with actual kill behavior (#4974)
The manpage claimed that ExecStop would be followed immediately by
SIGKILL, whereas the actual behavior is to go through KillMode= and
KillSignal= first.

Fixes #4490
2016-12-24 11:34:26 +01:00
Susant Sahani 42125eda21 networkd: Add example to create MACVTAP and attach it to a link (#4946)
Fixes: #4914
2016-12-23 18:09:29 +01:00
Susant Sahani 8f9a206b6c networkd: Rename ProxyARP to IPv4ProxyARP (#4947)
Rename the arp proxy option to IPv4ProxyARP= in order to clarify
its relationship to IPv4, and map to the various IPv6 options we have.

Fixes: #4768
2016-12-22 10:23:29 +01:00
Martin Pitt 4050e04b2c resolved: correctly handle non-address RR types with /etc/hosts lookups (#4808)
Fix wrong condition test in manager_etc_hosts_lookup(), which caused it to
return an IPv4 answer when an IPv6 question was asked, and vice versa.
Also only return success if we actually found any A or AAAA record.

In systemd-resolved.service(8), point out that /etc/hosts mappings only
affect address-type lookups, not other types.

The test case currently disables DNSSEC in resolved, as there is a bug
where "-t MX" fails due to "DNSSEC validation failed" even after
"downgrading to non-DNSSEC mode". This should be dropped once that bug
gets fixed.

Fixes #4801
2016-12-22 07:58:02 +01:00
Susant Sahani eb64b435eb networkd: bond support primary slave and active slave (#4873)
active_slave:

Specifies the new active slave for modes that support it
(active-backup, balance-alb and balance-tlb).

primary slave:
systemd-networks currently lacks the capability to set the primary slave
in an
active-backup bonding. This is necessary if you prefer one interface
over the
other. A common example is a eth0-wlan0 bonding on a laptop where you'd
want to
switch to the wired connection whenever it's available.

Fixes: #2837
2016-12-21 19:10:36 +01:00
Lennart Poettering e4b45b32e5 man: document that services need at least one of ExecStart= or ExecStop=
Fixes: #4521
2016-12-21 19:09:32 +01:00
Lennart Poettering 33fc1800d6 man: improve ShowStatus=/systemd.show_status=/--show-status= documentation
Fixes: #4928
2016-12-21 19:09:32 +01:00
Lennart Poettering c0cee5f1e8 man: drop superfluous 'this' in man page 2016-12-21 19:09:31 +01:00
Lennart Poettering 2f3dfc6fb4 verity: add support for setting up verity-protected root disks in the initrd
This adds a generator and a small service that will look for "roothash="
on the kernel command line and use it for setting up a very partition
for the root device.

This provides similar functionality to nspawn's existing --roothash=
switch.
2016-12-21 19:09:30 +01:00
Lennart Poettering 91214a37ef fstab-generator: add support for volatile boots
This adds support for a new kernel command line option "systemd.volatile=" that
provides the same functionality that systemd-nspawn's --volatile= switch
provides, but for host systems (i.e. systems booting with a kernel).

It takes the same parameter and has the same effect.

In order to implement systemd.volatile=yes a new service
systemd-volatile-root.service is introduced that only runs in the initrd and
rearranges the root directory as needed to become a tmpfs instance. Note that
systemd.volatile=state is implemented different: it simply generates a
var.mount unit file that is part of the normal boot and has no effect on the
initrd execution.

The way this is implemented ensures that other explicit configuration for /var
can always override the effect of these options.  Specifically, the var.mount
unit is generated in the "late" generator directory, so that it only is in
effect if nothing else overrides it.
2016-12-21 19:09:29 +01:00
Lennart Poettering 1d84ad9445 util-lib: various improvements to kernel command line parsing
This improves kernel command line parsing in a number of ways:

a) An kernel option "foo_bar=xyz" is now considered equivalent to
   "foo-bar-xyz", i.e. when comparing kernel command line option names "-" and
   "_" are now considered equivalent (this only applies to the option names
   though, not the option values!). Most of our kernel options used "-" as word
   separator in kernel command line options so far, but some used "_". With
   this change, which was a source of confusion for users (well, at least of
   one user: myself, I just couldn't remember that it's systemd.debug-shell,
   not systemd.debug_shell). Considering both as equivalent is inspired how
   modern kernel module loading normalizes all kernel module names to use
   underscores now too.

b) All options previously using a dash for separating words in kernel command
   line options now use an underscore instead, in all documentation and in
   code. Since a) has been implemented this should not create any compatibility
   problems, but normalizes our documentation and our code.

c) All kernel command line options which take booleans (or are boolean-like)
   have been reworked so that "foobar" (without argument) is now equivalent to
   "foobar=1" (but not "foobar=0"), thus normalizing the handling of our
   boolean arguments. Specifically this means systemd.debug-shell and
   systemd_debug_shell=1 are now entirely equivalent.

d) All kernel command line options which take an argument, and where no
   argument is specified will now result in a log message. e.g. passing just
   "systemd.unit" will no result in a complain that it needs an argument. This
   is implemented in the proc_cmdline_missing_value() function.

e) There's now a call proc_cmdline_get_bool() similar to proc_cmdline_get_key()
   that parses booleans (following the logic explained in c).

f) The proc_cmdline_parse() call's boolean argument has been replaced by a new
   flags argument that takes a common set of bits with proc_cmdline_get_key().

g) All kernel command line APIs now begin with the same "proc_cmdline_" prefix.

h) There are now tests for much of this. Yay!
2016-12-21 19:09:08 +01:00
Susant Sahani 7dd6974c46 networkd: vxlan rename ARPProxy to ReduceARPProxy (#4891)
Fixes: #4768
2016-12-21 18:59:15 +01:00
Lennart Poettering f582cbca00 firstboot: add kernel cmdline option to disable firstboot wizard
If booting with systemd.firstboot=0 the wizard will be skipped.
2016-12-20 20:00:09 +01:00
Baruch Siach 72d17ce680 man/journalctl: mention systemd-journal-remote(8) (#4929)
Make it easier to figure out how to use the journalctl export format.
2016-12-20 14:59:26 +01:00
Lennart Poettering ce5cbd8679 Merge pull request #4904 from dobyrch/calendar-range-step
calendarspec: allow repetition values with ranges
2016-12-20 11:14:59 +01:00
Zbigniew Jędrzejewski-Szmek 117d5a27a3 Merge pull request #4845 from poettering/various-smaller-fixes
Various smaller fixes
2016-12-17 13:36:00 -05:00
Douglas Christman a2eb5ea79c calendarspec: allow repetition values with ranges
"Every other hour from 9 until 5" can be written as
`9..17/2:00` instead of `9,11,13,15,17:00`
2016-12-16 19:27:33 -05:00