Commit Graph

3782 Commits

Author SHA1 Message Date
Lennart Poettering ce3ec07f41
Merge pull request #9165 from ssahani/networkd-netdevsim
networkd: introduce netdev "Netdevsim" Driver
2018-06-07 16:56:32 +02:00
Stefan Schweter 6a1bae8381 man: update url to latest 802.1AB (2016) standard 2018-06-07 10:30:23 +02:00
Zbigniew Jędrzejewski-Szmek fa17b4e8d9 bus: optionally call a callbacks for cleanup
This adds a function sd_bus_slot_set_destroy_callback() to set a function
which can free userdata or perform other cleanups.

sd_bus_slot_get_destory_callback() queries the callback, and is included
for completeness.

Without something like this, for floating asynchronous callbacks, which might
be called or not, depending on the sequence of events, it's hard to perform
resource cleanup. The alternative would be to always perform the cleanup from
the caller too, but that requires more coordination and keeping of some shared
state. It's nicer to keep the cleanup contained between the callback and the
function that requests the callback.
2018-06-06 23:01:57 +02:00
Zbigniew Jędrzejewski-Szmek e3736e0223 man: also mention EINVAL in sd_bus_slot_set_floating(3) 2018-06-06 23:01:25 +02:00
Zbigniew Jędrzejewski-Szmek 7d6b27238f man: xinclude the generic text to talk about libsystemd pkgconfig
The only difference is that functions are not individually listed by name,
but that seems completely pointless, since all functions that are documented
are always exported, so the generic text tells the user all she or he needs
to know.
2018-06-06 23:01:25 +02:00
Zbigniew Jędrzejewski-Szmek 0e37c169fb man: add example for sd_event_add_inotify 2018-06-06 13:09:36 +02:00
Lennart Poettering 1eb54dc645 man: document the new sd_event_add_inotify() call 2018-06-06 10:53:56 +02:00
Michael Prokop 7fc97da0f8 man: fix typo 2018-06-06 12:22:47 +09:00
Zbigniew Jędrzejewski-Szmek 7a8aa0ec0a man: use entities for fedora number and update URL
Fedora 28 is out already, let's advertise it. While at it, drop "container"
from "f28container" — it's a subdirectory under /var/lib/machines, it's pretty
obvious that's it a container.

To make the switch easier in the future, define the number as an entity.
2018-06-05 11:04:01 +02:00
Lennart Poettering 0be9b12be2
Merge pull request #9147 from keszybz/runtime-enablement
Runtime enablement
2018-06-04 11:58:21 +02:00
Yu Watanabe d3c8afd092 man: RuntimeDirectory= or friends accept dot contained paths 2018-06-04 01:44:04 +09:00
Susant Sahani 56e7fb5088 networkd: introduce netdev "Netdevsim" Driver
This "netdevsim" as implied by the name is a tool for network developers and is a simulator.
This simulated networking device is used for testing various networking APIs and at this time
is particularly focused on testing hardware offloading related interfaces.
2018-06-03 08:16:11 +05:30
Susant Sahani 866e6b7a12 networkd: enable to set IFF_ALLMULTI to network device (#9146)
networkd: allow setting set IFF_ALLMULTI flag on network devices
2018-06-01 16:22:12 +02:00
Zbigniew Jędrzejewski-Szmek 4910b35078 systemctl: when removing enablement or mask symlinks, cover both /run and /etc
'systemctl disable --runtime' would disable a unit, but only if it was enabled
with '--runtime', and silently do nothing if the unit was enabled persistently.
And similarly 'systemctl disable' would do nothing if the unit was enabled in
/run. This just doesn't seem useful.

This pathch changes enable/disable and mask/unmask to be asymmetrical. enable
and mask create symlinks in /etc or /run, depending on whether --runtime was
specified. disable and unmask remove symlinks from both locations. --runtime
cannot be specified for the disable and unmask verbs.

The advantage is that 'disable' now means that the unit is disabled, period.
And similarly for 'unmask', all masks are removed.

Similarly for preset and preset-all, they now cannot be called with --runtime,
and are asymmetrical: when they enable a unit, symlinks are created in /etc.
When they disable a unit, all symlinks are nuked.

$ systemctl --root=/ enable bluetooth
Created symlink /etc/systemd/system/dbus-org.bluez.service → /usr/lib/systemd/system/bluetooth.service.
Created symlink /etc/systemd/system/bluetooth.target.wants/bluetooth.service → /usr/lib/systemd/system/bluetooth.service.
$ systemctl --root=/ --runtime enable bluetooth
Created symlink /run/systemd/system/dbus-org.bluez.service → /usr/lib/systemd/system/bluetooth.service.
Created symlink /run/systemd/system/bluetooth.target.wants/bluetooth.service → /usr/lib/systemd/system/bluetooth.service.
$ systemctl --root=/ disable bluetooth
Removed /run/systemd/system/bluetooth.target.wants/bluetooth.service.
Removed /run/systemd/system/dbus-org.bluez.service.
Removed /etc/systemd/system/bluetooth.target.wants/bluetooth.service.
Removed /etc/systemd/system/dbus-org.bluez.service.
$ systemctl --root=/ disable --runtime bluetooth
--runtime cannot be used with disable

$ systemctl --root=/ mask --runtime bluetooth
Created symlink /run/systemd/system/bluetooth.service → /dev/null.
$ systemctl --root=/ mask bluetooth
Created symlink /etc/systemd/system/bluetooth.service → /dev/null.
$ systemctl --root=/ unmask bluetooth
Removed /run/systemd/system/bluetooth.service.
Removed /etc/systemd/system/bluetooth.service.
$ systemctl --root=/ unmask --runtime bluetooth
--runtime cannot be used with unmask

$ systemctl --root=/ --runtime enable bluetooth
Created symlink /run/systemd/system/dbus-org.bluez.service → /usr/lib/systemd/system/bluetooth.service.
Created symlink /run/systemd/system/bluetooth.target.wants/bluetooth.service → /usr/lib/systemd/system/bluetooth.service.
$ systemctl --root=/ enable bluetooth
Created symlink /etc/systemd/system/dbus-org.bluez.service → /usr/lib/systemd/system/bluetooth.service.
Created symlink /etc/systemd/system/bluetooth.target.wants/bluetooth.service → /usr/lib/systemd/system/bluetooth.service.
$ systemctl --root=/ preset bluetooth
Removed /run/systemd/system/bluetooth.target.wants/bluetooth.service.
Removed /run/systemd/system/dbus-org.bluez.service.
Removed /etc/systemd/system/bluetooth.target.wants/bluetooth.service.
Removed /etc/systemd/system/dbus-org.bluez.service.
$ systemctl --root=/ preset --runtime bluetooth
--runtime cannot be used with preset

$ systemctl preset-all --runtime
--runtime cannot be used with preset-all
2018-06-01 15:10:33 +02:00
Lennart Poettering 89544ae658
Merge pull request #9014 from keszybz/fuzz-journal-remote
A fuzzer for journal-remote
2018-05-31 15:33:44 +02:00
Zbigniew Jędrzejewski-Szmek 8d96289711
Merge pull request #9145 from poettering/itsy-bitsy-fixes
trivial fixes
2018-05-31 13:38:53 +02:00
Lennart Poettering aafcd2523b man: say more explicitly what to do in the SD_JOURNAL_INVALIDATE event
This rewords the section, explicitly distuingishing the cases of clients
that only want a continious log stream (which can simply treat
SD_JOURNAL_INVALIDATE the same way as SD_JOURNAL_APPEND) and those which
want to represent on screen the full state of the log data on disk.

This is an alternative to a part of PR #9060, but keeps an explanation
of the destinction of handling depending on the type of client.

Fixes: #8963
2018-05-31 13:24:37 +02:00
Zbigniew Jędrzejewski-Szmek ea03f6ba0d sd-id128: return -ENOMEDIUM on null id
We currently return -ENOMEDIUM when /etc/machine-id is empty, and -EINVAL when
it is all zeros. But -EINVAL is also used for invalid args. The distinction
between empty and all-zero is not very important, let's use the same return
code.

Also document -ENOENT and -ENOMEDIUM since they can be a bit surprising.
2018-05-31 13:04:18 +02:00
Lennart Poettering 9554591d45 tree-wide: drop some double newlines 2018-05-31 12:19:34 +02:00
Lennart Poettering 642b59ff40
Merge pull request #9115 from yuwata/rfe-8491
locale: re-read configuration files if necessary
2018-05-31 11:54:01 +02:00
Lennart Poettering 309ee4c26c
Merge pull request #9144 from yuwata/sysusers-spec
sysusers: support specifier expansion for GECOS and home directory
2018-05-31 11:41:29 +02:00
Yu Watanabe 4156e767f6 locale: assume locale is for LANG= when variable name is not specified
Closes #6070.
2018-05-31 17:57:41 +09:00
Yu Watanabe 33ab22fcb9 man: mention that systemd-sysusers understand the specifier. 2018-05-31 17:37:57 +09:00
Yu Watanabe 617d253afa load-fragment: make IOScheduling{Class,Priority}= accept the empty string 2018-05-31 11:09:41 +09:00
Lennart Poettering 1004b2c7bc man: document the new sd_bus_slot_set_floating() call
Also extend the memory management description of sd-bus highlighting the
effect of "floating" slot objects a bit.
2018-05-30 17:34:34 +02:00
Lennart Poettering d7828e117a man: fix minor typo 2018-05-30 17:13:51 +02:00
Susant Sahani e6ebebbe6a networkd: Add ability to set MULTICAST flag on interface
Closes #9113

fix ARP toggling flag
2018-05-30 12:59:24 +02:00
Zbigniew Jędrzejewski-Szmek 706a3df4be man: recommend After= with Requisite=
Fixes #8309.
2018-05-29 18:52:45 +02:00
Lennart Poettering 052c59c3d0 man: don't refer to "service manager" in tmpfiles.d(5)
system-tmpfiles is not a "service manager" hence say "command" instead.
2018-05-29 11:39:15 +02:00
Lennart Poettering b294e5943f core: introduce specifiers for /tmp and /var/tmp
This corresponds nicely with the specifiers we already pass for
/var/lib, /var/cache, /run and so on.

This is particular useful to update the test-path service files to
operate without guessable files, thus allowing multiple parallel
test-path invocations to pass without issues (the idea is to set $TMPDIR
early on in the test to some private directory, and then only use the
new %T or %V specifier to refer to it).
2018-05-29 11:39:15 +02:00
Lennart Poettering 709f4c472c man: sort specifier list in systemd.unit(5) alphabetically
Usually, we order our settings in our unit files in a logical order,
grouping related settings together, and putting more relevant stuff
first, instead of following a strictly alphabetical order.

For specifiers I think it makes sense to follow an alphabetical order
however, since they literally are just characters, and hence I think the
concept of alphabetical ordering is much more commanding for them. Also,
since specifiers are usually not used in combination, but mostly used
indepdently of each other I think it's not that important to group
similar ones together.

No other changes except the reordering.
2018-05-29 11:39:15 +02:00
Yu Watanabe c2b67dc673 man: use IMAGE for portable service image name 2018-05-28 18:16:32 +09:00
Yu Watanabe bbc1acaba0 core: add --dump-bus-properties option to systemd
If systemd is invoked with this option, this dumps all bus properties.
This may be useful for shell completion for `systemctl --property`.
2018-05-28 18:13:19 +09:00
Luca Boccassi 49805b3d81 journalctl: add with-unit mode
When dealing with a large number of template instances, for example
when launching daemons per VRF, it is hard for operators to correlate
log lines to arguments.
Add a new with-unit mode which, if available, prefixes unit and user
unit names when displaying its log messages instead of the syslog
identifier. It will also use the full timestamp with timezones, like
the short-full mode.
2018-05-25 14:45:34 +02:00
Lennart Poettering a8c42bb8f3 man: add man pages for the portable service stuff 2018-05-24 17:01:57 +02:00
Lennart Poettering cdc0f9be92
Merge pull request #8817 from yuwata/cleanup-nsflags
core: allow to specify RestrictNamespaces= multiple times
2018-05-24 16:49:13 +02:00
Susant Sahani cea79e6643 networkd: Support the ability to set MTU in [Route] sections
Add support to set the route MTU.

Closes #9047
2018-05-24 16:42:40 +02:00
Zbigniew Jędrzejewski-Szmek 17c1b9a93f
Merge pull request #9024 from poettering/nspawn-attrs-more
make even more nspawn concepts configurable
2018-05-24 16:27:27 +02:00
Will Thompson da6c7806fd tmpfiles: fix documented constant for exit code 73
sysexits.h has:

    #define EX_CANTCREAT	73	/* can't create (user) output file */

EX_DATAERR is a copy-paste error from the previous sentence, which is
correct.
2018-05-22 18:35:34 +02:00
Lennart Poettering 1688841f46 nspawn: similar to the previous patches, also make /etc/localtime handling more configurable
Fixes: #9009
2018-05-22 16:21:26 +02:00
Lennart Poettering 4e1d6aa983 nspawn: make --link-journal= configurable through .nspawn files, too 2018-05-22 16:20:08 +02:00
Lennart Poettering 09d423e921 nspawn: add greater control over how /etc/resolv.conf is handled
Fixes: #8014 #1781
2018-05-22 16:19:26 +02:00
Lennart Poettering a5201ed6ce tree-wide: fix a couple of TABs 2018-05-22 16:13:45 +02:00
Lennart Poettering 398246292e detect-virt: add new --list command for showing all currently known VM/container envs 2018-05-22 13:14:18 +02:00
Zbigniew Jędrzejewski-Szmek 930362ab26 man: fix typo in man page citation
Fixes #9045.
2018-05-21 11:06:32 +09:00
Lucas Werkmeister 90bc77af29 man: fix typo 2018-05-19 15:01:52 +09:00
Zbigniew Jędrzejewski-Szmek 7fbb5dd5e2
Merge pull request #8940 from poettering/nspawn-attrs
nspawn: make a couple of additional container parameters configurable
2018-05-18 10:33:10 +02:00
David Tardon f3c9133c50 inhibit: use pager for systemd-inhibit --list 2018-05-18 08:33:45 +02:00
Lennart Poettering d107bb7d63 nspawn: add a new --cpu-affinity= switch
Similar as the other options added before, this is primarily useful to
provide comprehensive OCI runtime compatbility, but might be useful
otherwise, too.
2018-05-17 20:48:54 +02:00
Lennart Poettering 81f345dfed nspawn: add a new --oom-score-adjust= command line switch
This is primarily useful in order to provide comprehensive OCI runtime
compatibility with nspawn, but might have uses outside of it.
2018-05-17 20:48:12 +02:00