Lennart Poettering [Fri, 17 Nov 2017 17:03:00 +0000 (18:03 +0100)]
update TODO
Lennart Poettering [Fri, 17 Nov 2017 15:43:08 +0000 (16:43 +0100)]
core: unify common code for preparing for forking off unit processes
This introduces a new function unit_prepare_exec() that encapsulates a
number of calls we do in preparation for spawning off some processes in
all our unit types that do so.
This allows us to neatly unify a bit of code between unit types and
shorten our code.
Lennart Poettering [Fri, 17 Nov 2017 15:27:13 +0000 (16:27 +0100)]
cgroup-util: move Set* allocation into cg_kernel_controllers()
Previously, callers had to do this on their own. Let's make the call do
that instead, making the caller code a bit shorter.
Lennart Poettering [Fri, 17 Nov 2017 12:42:58 +0000 (13:42 +0100)]
nspawn: minor optimization
no need to prepare the target path if we quite the loop anyway one step
later.
Lennart Poettering [Fri, 17 Nov 2017 12:35:56 +0000 (13:35 +0100)]
nspawn-mount: rework get_controllers() a bit
Let's rename get_controllers() → get_process_controllers(), in order to
underline the difference to cg_kernel_controllers(). After all, one
returns the controllers available to the process, the other the
controllers enabled in the kernel at all).
Let's also update the code to use read_line() and set_put_strdup() to
shorten the code a bit, and make it more robust.
Lennart Poettering [Fri, 17 Nov 2017 12:05:30 +0000 (13:05 +0100)]
nspawn: rework mount_systemd_cgroup_writable() a bit
We shouldn't call alloca() as part of function calls, that's not really
defined in C. Hence, let's first do our stack allocations, and then
invoke functions.
Also, some coding style fixes, and minor shuffling around.
No functional changes.
Lennart Poettering [Fri, 17 Nov 2017 12:02:14 +0000 (13:02 +0100)]
cgroup: move cgroup controller names def.h → cgroup-util.h
These definitions are clearly cgroup specific, hence let's move them out
of def.h
Susant Sahani [Tue, 21 Nov 2017 10:54:14 +0000 (16:24 +0530)]
networkd: cleanup do not call link_enter_set_routes after label is set. (#6935)
Remove link_enter_set_routes after label is set.
Susant Sahani [Tue, 21 Nov 2017 10:51:50 +0000 (16:21 +0530)]
networkd: support incoming/outgoing device for rule matching (#7223)
Closes #7210
Shawn Landden [Tue, 21 Nov 2017 07:24:12 +0000 (23:24 -0800)]
shared: silence gcc warning (#7402)
[346/1860] Compiling C object 'src/shared/systemd-shared-235@sha/firewall-util.c.o'.
../src/shared/firewall-util.c: In function ‘entry_fill_basics’:
../src/shared/firewall-util.c:81:79: warning: logical ‘and’ of equal expressions [-Wlogical-op]
[543/1860] Compiling C object 'src/shared/systemd-shared-235@sta/firewall-util.c.o'.
../src/shared/firewall-util.c: In function ‘entry_fill_basics’:
../src/shared/firewall-util.c:81:79: warning: logical ‘and’ of equal expressions [-Wlogical-op]
Shawn Landden [Tue, 21 Nov 2017 02:05:57 +0000 (18:05 -0800)]
NEWS: fix minor error (#7399)
lukas [Mon, 20 Nov 2017 12:43:48 +0000 (13:43 +0100)]
hwdb: Add ACCEL_MOUNT_MATRIX for the Acer Aspire Switch 10 convertible
SW5-012 (#7394)
Zbigniew Jędrzejewski-Szmek [Mon, 20 Nov 2017 19:08:11 +0000 (20:08 +0100)]
test: fall back to /boot if bootctl -p fails (#7397)
It doesn't really matter why.
Susant Sahani [Mon, 20 Nov 2017 18:23:34 +0000 (23:53 +0530)]
networkd: configure link even if no routes have been received by dhcp (#6886)
Fixes #3752
networkctl
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
2 eth0 ether no-carrier configuring
5 host ether routable configured <==========
5 links listed.
Lennart Poettering [Mon, 20 Nov 2017 18:21:36 +0000 (19:21 +0100)]
Merge pull request #6910 from ssahani/issue-6359
networkd: For IPv6 addresses do not treat IFA_F_DEPRECATED as not ready. (Fix #6359)
Lennart Poettering [Mon, 20 Nov 2017 18:20:23 +0000 (19:20 +0100)]
Merge pull request #6918 from ssahani/issue-5625
networkd: ndisc - do not stop ndisc client incase of conf error.
Susant Sahani [Mon, 20 Nov 2017 18:16:01 +0000 (23:46 +0530)]
networkd: address - support for /31 IPv4 addresses (rfc3021) (#6938)
When configuring a network address with /31 using networkd, a /31 without a
broadcast specified should be present.
A /31 which has neither a network nor a broadcast address. See
https://tools.ietf.org/html/rfc3021
Fixes #4038
Susant Sahani [Mon, 20 Nov 2017 17:58:06 +0000 (23:28 +0530)]
networkd: Do not send requests to create netdevs if they exists. (#6973)
If the netdev already exists we should not send requests to
kernel to create them.
fixes #5448
Susant Sahani [Mon, 20 Nov 2017 16:50:48 +0000 (22:20 +0530)]
networkd: Set RoutingPolicyRule in link_configure (#7235)
The RoutingPolicyRules are not added when we are calling from set_address
the link->message++ and link->message-- never reaches to zero in the callback function
resulting routes are never gets added.
Closes #7200
Zbigniew Jędrzejewski-Szmek [Mon, 20 Nov 2017 13:46:02 +0000 (14:46 +0100)]
Merge pull request #7375 from poettering/readme-updates
some README updates
Zbigniew Jędrzejewski-Szmek [Mon, 20 Nov 2017 13:27:46 +0000 (14:27 +0100)]
man: fix description of --force in halt(8) (#7392)
https://bugzilla.redhat.com/show_bug.cgi?id=1449751
Lennart Poettering [Mon, 20 Nov 2017 12:06:33 +0000 (13:06 +0100)]
Merge pull request #7154 from keszybz/bootspec
List bootspec entries in bootctl and use the default for kexec
Lennart Poettering [Mon, 20 Nov 2017 11:51:40 +0000 (12:51 +0100)]
Merge pull request #7387 from yuwata/fix-7370
core: load() should fail when the corresponding unit file does not exist
Lennart Poettering [Mon, 20 Nov 2017 11:30:42 +0000 (12:30 +0100)]
README,sysusers: complete and order list of default udev groups we need
Let's make sure the list of default udev groups we need are ordered in
README and in the sysusers.d snippet, and both are complete.
Lennart Poettering [Fri, 17 Nov 2017 10:39:48 +0000 (11:39 +0100)]
README: slightly update the section about split /usr
It's fine if /usr is actually on a separate fs. What matters is that it
is mounted early enough. Say so.
Lennart Poettering [Fri, 17 Nov 2017 10:39:14 +0000 (11:39 +0100)]
README: document that prefix *must* be /usr and nss-systemd is not an option
See: #7374
Zbigniew Jędrzejewski-Szmek [Mon, 20 Nov 2017 11:14:47 +0000 (12:14 +0100)]
meson: add -Wimplicit-fallthrough=3 to compilation options (#7393)
At some point before gcc-7 was released, -Wimplicit-fallthrough=3 was included
in -Wextra. The documentation for gcc-7.2.1-2.fc27.x86_64 still says that, but
empirical testing shows that it's not. The documentation also misstates that
-Wimplicit-fallthrough is equivalent to -Wimplicit-fallthrough=3.
Let's add -Wimplicit-fallthrough=3 explicitly to get the warnings if we regress.
Prompted by #7389.
Zbigniew Jędrzejewski-Szmek [Mon, 20 Nov 2017 10:25:55 +0000 (11:25 +0100)]
Merge pull request #7373 from poettering/analyze-calendar
add nifty little "systemd-analyze calendar" command
Lennart Poettering [Mon, 20 Nov 2017 09:54:21 +0000 (10:54 +0100)]
systemctl: elapsation → elapse
Lennart Poettering [Fri, 17 Nov 2017 09:34:52 +0000 (10:34 +0100)]
update TODO
Lennart Poettering [Fri, 17 Nov 2017 09:33:22 +0000 (10:33 +0100)]
analyze: add new "calendar" command
This little new command can parse, validate, normalize calendar events,
and calculate when they will elapse next. This should be useful for
anyone writing calendar events and who'd like to validate the expression
before running them as timer units.
John Lin [Mon, 20 Nov 2017 09:55:52 +0000 (17:55 +0800)]
man: Requires= stops this unit when dependencies get deactivated (#7391)
Fixes: #7372
Lennart Poettering [Mon, 20 Nov 2017 09:52:20 +0000 (10:52 +0100)]
util: add new helper in_utc_timezone()
As the name suggests it checks whether we are running in an UTC
timezone.
Lennart Poettering [Fri, 17 Nov 2017 09:32:48 +0000 (10:32 +0100)]
calendarspec: rework destructor to return its own type
Let's make it more alike most of our other destructors.
Zbigniew Jędrzejewski-Szmek [Mon, 20 Nov 2017 07:08:43 +0000 (08:08 +0100)]
meson: bump required meson version to 0.41 (#7385)
We need data_dirs argument for i18n.merge_file, added in 0.40.1-11-g82492f5d76.
Yu Watanabe [Sun, 19 Nov 2017 16:00:34 +0000 (01:00 +0900)]
core/swap: load() should fail when neither of corresponding unit file nor /proc/swap entry does not exist
It is not necessary to label as loaded to a swap unit when neither of
corresponding unit file nor entry in /proc/swap does not exist.
This makes swap_load() to fail such a case.
Partially fixes #7370.
Yu Watanabe [Sun, 19 Nov 2017 07:45:35 +0000 (16:45 +0900)]
core/automount: load() should fail when the unit file does not exist
It is not necessary to label as loaded to automount unit when its unit
file does not exist. So, let's make automount_load() to fail when the
unit file does not exist.
Partially fixes #7370.
Lennart Poettering [Sun, 19 Nov 2017 18:50:03 +0000 (19:50 +0100)]
Merge pull request #7376 from keszybz/simplify-root-options
Simplify root configuration options
Lennart Poettering [Sun, 19 Nov 2017 18:49:11 +0000 (19:49 +0100)]
Merge pull request #7198 from poettering/stdin-stdout
Add StandardInput=data, StandardInput=file:... and more
Lennart Poettering [Sun, 19 Nov 2017 18:47:24 +0000 (19:47 +0100)]
Merge pull request #7379 from yuwata/follow-up-7309
networkd: small fixes
Lennart Poettering [Sun, 19 Nov 2017 18:46:52 +0000 (19:46 +0100)]
Merge pull request #7386 from keszybz/spdx
Add some missing license headers and add SPDX identifiers
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 17:32:01 +0000 (18:32 +0100)]
Add license headers and SPDX identifiers to meson.build files
So far I avoided adding license headers to meson files, but they are pretty
big and important and should carry license headers like everything else.
I added my own copyright, even though other people modified those files too.
But this is mostly symbolic, so I hope that's OK.
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 17:21:19 +0000 (18:21 +0100)]
Add SPDX license headers to shell completion scripts
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 17:18:16 +0000 (18:18 +0100)]
Add SPDX license headers to various assorted files
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 16:52:56 +0000 (17:52 +0100)]
Add missing headers and SPDX identifiers to man pages
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 16:35:03 +0000 (17:35 +0100)]
Add SPDX license headers to unit files
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 16:32:46 +0000 (17:32 +0100)]
Add SPDX license headers to python scripts
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 16:26:32 +0000 (17:26 +0100)]
Add SPDX indentifier to hwdb/parse_hwdb.py
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 16:22:32 +0000 (17:22 +0100)]
Add SPDX license identifiers to man pages
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 16:17:35 +0000 (17:17 +0100)]
Add SPDX license identifiers to catalog and po files
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 16:14:42 +0000 (17:14 +0100)]
Add SPDX license identifiers to source files under the GPL
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 16:09:20 +0000 (17:09 +0100)]
Add SPDX license identifiers to source files under the LGPL
This follows what the kernel is doing, c.f.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=
5fd54ace4721fc5ce2bb5aef6318fcf17f421460.
Lennart Poettering [Sun, 19 Nov 2017 16:50:35 +0000 (17:50 +0100)]
Merge pull request #7388 from keszybz/doc-tweak
Add link to kernel docs about no_new_privs and drop note about CPU controller
Lennart Poettering [Sun, 19 Nov 2017 13:23:29 +0000 (14:23 +0100)]
machined: support "machinectl bind" on non-directories (#7349)
Fixes: #7195
Zbigniew Jędrzejewski-Szmek [Sun, 19 Nov 2017 13:15:42 +0000 (14:15 +0100)]
man: remove note about CPU controller being unmerged
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=
0d5936344f30aba0f6ddb92b030cb6a05168efe6
In principle we shouldn't merge this until after 4.15 is released, but the
chances of a revert upstream are low, and in that unlikely scenario we can just
revert this patch, it's a trivial documentation update after all.
Zbigniew Jędrzejewski-Szmek [Sun, 19 Nov 2017 13:01:39 +0000 (14:01 +0100)]
Merge pull request #7365 from poettering/nspawn-bind-userns
nspawn: document --bind= and --private-users relationship, and make recursive chown()ing safe
Zbigniew Jędrzejewski-Szmek [Fri, 17 Nov 2017 13:09:11 +0000 (14:09 +0100)]
test: do not hardcode location of EFI partition
Zbigniew Jędrzejewski-Szmek [Fri, 17 Nov 2017 12:55:05 +0000 (13:55 +0100)]
bootctl: add a convenient way to print the path to EFI
Zbigniew Jędrzejewski-Szmek [Fri, 17 Nov 2017 12:50:08 +0000 (13:50 +0100)]
bootctl: rename r2 and r to r and k
r2 was assigned first despite the name. This scheme is different than
what is used elsewhere in the code. Rename to make it easier to read.
Zbigniew Jędrzejewski-Szmek [Sat, 21 Oct 2017 08:55:32 +0000 (10:55 +0200)]
systemctl: make sure the kernel is loaded before kexec'ing
We just load the same kernel that would be loaded by default by sd-boot, with
the same options. Changing the kernel or initramfs or options is left for
later.
Now we will refuse to continue if loading fails. This makes 'systemctl kexec'
more predictable: it will not fall back to normal reboot if the kernel is
not loaded.
Zbigniew Jędrzejewski-Szmek [Sun, 19 Nov 2017 10:58:45 +0000 (11:58 +0100)]
man: add link to kernel docs about no_new_privs
Yu Watanabe [Fri, 17 Nov 2017 16:24:07 +0000 (01:24 +0900)]
networkd: fix indentation
Yu Watanabe [Fri, 17 Nov 2017 16:22:34 +0000 (01:22 +0900)]
networkd: remove debug message and unref when error
Follow-up for
8006aa32ee29538ef1d7978d60d6427a0bf31e80.
Lennart Poettering [Fri, 17 Nov 2017 14:22:11 +0000 (15:22 +0100)]
core: be more defensive if we can't determine per-connection socket peer (#7329)
Let's handle gracefully if a client disconnects very early on.
This builds on #4120, but relaxes the condition checks further, since we
getpeername() might already fail during ExecStartPre= and friends.
Fixes: #7172
John Lin [Fri, 17 Nov 2017 14:20:48 +0000 (22:20 +0800)]
man: rescue.target could be seen as single-user.target (#7323)
Lennart Poettering [Fri, 17 Nov 2017 14:18:30 +0000 (15:18 +0100)]
man: document that start limiting of GC'ed units doesn't work (#7337)
Fixes: #7139
Zbigniew Jędrzejewski-Szmek [Fri, 17 Nov 2017 14:00:22 +0000 (15:00 +0100)]
Merge pull request #7360 from poettering/preset-fix
Some fixes for preset-all logic at boot, plus main.c reworking
Zbigniew Jędrzejewski-Szmek [Fri, 17 Nov 2017 13:51:51 +0000 (14:51 +0100)]
Merge pull request #7338 from poettering/doc-restart-fix
improve unit restart documentation a bit
Zbigniew Jędrzejewski-Szmek [Fri, 17 Nov 2017 12:22:13 +0000 (13:22 +0100)]
meson: use absolute path for rpmmacrosdir
This only matter for the status display at the end of configure step.
Now it looks like:
RPM macros dir: /usr/lib/rpm/macros.d
Zbigniew Jędrzejewski-Szmek [Fri, 17 Nov 2017 12:07:46 +0000 (13:07 +0100)]
meson: drop rootprefix option
rootprefixdir is now always set to /usr or /, based on the split-usr setting.
Anything else does not work anyway.
C.f. #7375.
Lennart Poettering [Thu, 16 Nov 2017 11:30:33 +0000 (12:30 +0100)]
install: when we encounter a transient/generated unit while presetting all, skip over it silently
Fixes: #7100
Lennart Poettering [Thu, 16 Nov 2017 11:24:32 +0000 (12:24 +0100)]
main: uid_to_name() might theoretically fail, handle that
Lennart Poettering [Thu, 16 Nov 2017 11:02:39 +0000 (12:02 +0100)]
core: shorten main() a bit, split out coredump initialization
No functional changes.
Lennart Poettering [Thu, 16 Nov 2017 10:58:08 +0000 (11:58 +0100)]
main: let's make main() shorter, let's split out clock initialization
no functional changes
Lennart Poettering [Thu, 16 Nov 2017 10:54:53 +0000 (11:54 +0100)]
main: let's make main() shorter, let's split out invocation of shutdown binary
No functional changes
Lennart Poettering [Thu, 16 Nov 2017 10:48:45 +0000 (11:48 +0100)]
core: let's shorten main() a bit, let's split out telinit redirection into a separate function
Lennart Poettering [Thu, 16 Nov 2017 10:45:02 +0000 (11:45 +0100)]
main: add set_manager_settings(), similar in style to set_manager_defaults()
Lennart Poettering [Wed, 15 Nov 2017 18:56:21 +0000 (19:56 +0100)]
core: never apply first boot presets in the initrd
Presets are useful to initialize uninitialized /etc, but that doesn't
apply to the initrd.
Also, let's rename etc_empty → first_boot. After all, the variable
doesn't actually reflect whether /etc is really empty, it just reflects
whether /etc/machine-id existed originally or not. Moreover, we later on
directly initialize manager_set_first_boot() from it, hence let's just
name it the same way all through the codepath, to make this all less
confusing.
See: #7100
Lennart Poettering [Wed, 15 Nov 2017 19:15:01 +0000 (20:15 +0100)]
main: rename manager_set_defaults() → set_manager_defaults()
This function is really not a method of the Manager object (implemented
in manager.c), but just a helper in main.c. Hence let's not confusingly
name it the way methods are called.
Lennart Poettering [Wed, 15 Nov 2017 10:25:38 +0000 (11:25 +0100)]
update TODO
Lennart Poettering [Wed, 15 Nov 2017 10:25:19 +0000 (11:25 +0100)]
man: document that ExecStop= is executed during restarts
Fixes: #7126
Lennart Poettering [Wed, 15 Nov 2017 10:24:51 +0000 (11:24 +0100)]
man: add missing suffixing "=" for setting name
Lennart Poettering [Wed, 15 Nov 2017 10:23:00 +0000 (11:23 +0100)]
man: write "stop and start" instead of "restart" when explaining the reload fallback operations
We already made a similar change when talking about the "restart"
command, let's also do this for "systemctl reload" and friends.
Follow-up for:
6539dd7c42946d9ba5dc43028b8b5785eb2db3c5
See: #7126
Lennart Poettering [Wed, 15 Nov 2017 10:22:25 +0000 (11:22 +0100)]
man: document the interaction of "systemctl restart" and the FD store
See: #7126
Lennart Poettering [Fri, 27 Oct 2017 17:01:21 +0000 (19:01 +0200)]
update TODO
Lennart Poettering [Fri, 27 Oct 2017 16:10:34 +0000 (18:10 +0200)]
man: document all the new options we acquired
Lennart Poettering [Fri, 27 Oct 2017 14:28:15 +0000 (16:28 +0200)]
fs-util: rename path_is_safe() → path_is_normalized()
Already, path_is_safe() refused paths container the "." dir. Doing that
isn't strictly necessary to be "safe" by most definitions of the word.
But it is necessary in order to consider a path "normalized". Hence,
"path_is_safe()" is slightly misleading a name, but
"path_is_normalize()" is more descriptive, hence let's rename things
accordingly.
No functional changes.
Lennart Poettering [Fri, 27 Oct 2017 14:22:38 +0000 (16:22 +0200)]
core: don't allow DefaultStandardOutput= be set to socket/fd:/file:
These three settings only make sense within the context of actual unit
files, hence filter this out when applied to the per-manager default,
and generate a log message about it.
Lennart Poettering [Fri, 27 Oct 2017 14:16:19 +0000 (16:16 +0200)]
test: add basic test for StandardInput=file:
Lennart Poettering [Fri, 27 Oct 2017 14:13:59 +0000 (16:13 +0200)]
core: add exec_context_dump() support for fd: and file: stdio settings
This was missing for using fdnames as stdio, let's add support for
fdnames as well as file paths in one go.
Lennart Poettering [Fri, 27 Oct 2017 14:09:57 +0000 (16:09 +0200)]
core: add support for StandardInputFile= and friends
These new settings permit specifiying arbitrary paths as
stdin/stdout/stderr locations. We try to open/create them as necessary.
Some special magic is applied:
1) if the same path is specified for both input and output/stderr, we'll
open it only once O_RDWR, and duplicate them fd instead.
2) If we an AF_UNIX socket path is specified, we'll connect() to it,
rather than open() it. This allows invoking systemd services with
stdin/stdout/stderr connected to arbitrary foreign service sockets.
Fixes: #3991
Lennart Poettering [Fri, 27 Oct 2017 14:08:11 +0000 (16:08 +0200)]
core: fix handling of transient StandardOutputFileDescriptorName= and friends
Let's make sure to process the fdname first, before changing the actual
input/output setting, since the fdname part can fail due to OOM.
This way we don't leave half-initialized bits around.
Lennart Poettering [Fri, 27 Oct 2017 12:59:05 +0000 (14:59 +0200)]
execute: some extra asserts
In some cases we checked for fd validity already explicitly, let's do
this for all our fds.
Lennart Poettering [Fri, 27 Oct 2017 12:57:12 +0000 (14:57 +0200)]
core: fold property_get_input_fdname() and property_get_output_fdname() into one
property_get_output_fdname() already had two different control flows for
stdout and stderr, it might as well handle stdin too, thus shortening
our code a bit.
Lennart Poettering [Fri, 27 Oct 2017 12:32:22 +0000 (14:32 +0200)]
execute: fix type of open_terminal_as() flags parameter
It's the flags parameter we propagate here, not the mode parameter,
hence let's name it properly, and use the right type.
Lennart Poettering [Fri, 27 Oct 2017 09:40:53 +0000 (11:40 +0200)]
bus-unit-util: drop #ifdef HAVE_SECCOMP from bus client side
Whether seccomp is supported or not is a server implementation detail,
the client should not be altered by that, and clients should be able to talk
to servers configured differently than the client, hence drop the
HAVE_SECCOMP ifdeffery here.
(This would be different if we'd need libseccomp or so to implement the
client, but we don't)
Lennart Poettering [Fri, 27 Oct 2017 09:38:59 +0000 (11:38 +0200)]
test: add tests for StandardInputText= and StandardInputData=
Lennart Poettering [Fri, 27 Oct 2017 09:33:05 +0000 (11:33 +0200)]
core: add two new unit file settings: StandardInputData= + StandardInputText=
Both permit configuring data to pass through STDIN to an invoked
process. StandardInputText= accepts a line of text (possibly with
embedded C-style escapes as well as unit specifiers), which is appended
to the buffer to pass as stdin, followed by a single newline.
StandardInputData= is similar, but accepts arbitrary base64 encoded
data, and will not resolve specifiers or C-style escapes, nor append
newlines.
This may be used to pass input/configuration data to services, directly
in-line from unit files, either in a cooked or in a more raw format.
Lennart Poettering [Fri, 27 Oct 2017 09:15:20 +0000 (11:15 +0200)]
proc-cmdline: minor runlevel_to_target() coding style fixes
Let's not mix function calls and variable declarations, as well as
assignments and comparison in one expression.
Lennart Poettering [Fri, 27 Oct 2017 09:14:27 +0000 (11:14 +0200)]
hexdcoct: dump to stdout if FILE* is specified as NULL
We do a logic like that at various other places, let's do it here too,
to make this as little surprising as possible.