David Tardon
5edea3b77e
shell-completion: add systemctl list-automounts
2022-07-25 13:37:20 +02:00
David Tardon
2d5cdc6224
man: document systemctl list-automounts
2022-07-25 13:37:20 +02:00
David Tardon
ed462ea3fa
systemctl: add list-automounts verb
...
Fixes : #6056
2022-07-25 13:37:19 +02:00
David Tardon
0f787940b7
systemctl: simplify var. definition a bit
2022-07-25 13:23:19 +02:00
David Tardon
11d6270b42
systemctl: extract output of legend to a function
2022-07-25 13:23:17 +02:00
David Tardon
25facd0384
systemctl: drop unneeded condition
2022-07-25 13:12:31 +02:00
David Tardon
551d0afe2e
systemctl: reduce var. scope and shorten the code a bit
2022-07-25 13:08:12 +02:00
Frantisek Sumsal
05abe85033
boot: a couple of tweaks recommended by Coccinelle
2022-07-25 12:47:23 +02:00
Lennart Poettering
46e6449acb
systemctl: fix type used for array sizes to size_t
...
We always should use size_t for sizes of arrays (and any size of memory,
in fact), unless there's a strong reason to use something else. Hence,
let's fix these cases where we sloppily used "unsigned" or "int"
instead.
No change in behaviour, this is just to make things less surprising for
the random reader.
2022-07-25 12:46:57 +02:00
Lennart Poettering
8f304b991c
Merge pull request #23991 from yuwata/udev-reload
...
udev: reload rules and builtins only when mtime of a config changed
2022-07-25 11:20:08 +02:00
Quentin Deslandes
e88748c17e
sysctl: add --strict option to fail if sysctl does not exists
...
systemd-sysctl currently fails silently under any of these conditions:
- Missing permission to write a sysctl.
- Invalid sysctl (path doesn't exists).
- Ignore failure flag ('-' in front of the sysctl name).
Because of this behaviour, configuration issues can go unnoticed as
there is no way to detect those unless going through the logs.
--strict option forces systemd-sysctl to fail if a sysctl is invalid or
if permission are insufficient. Errors on sysctl marked as "ignore
failure" will still be ignored.
2022-07-25 10:15:43 +02:00
Rudi Heitbaum
3657d3a01c
glibc: Remove #include <linux/fs.h> to resolve fsconfig_command/mount_attr conflict with glibc 2.36
2022-07-24 20:52:35 +09:00
Yu Watanabe
7c35b78a0b
unit-file: avoid (null) in debugging logs
...
The variable `inst` was set to NULL by TAKE_PTR().
This fixes the following log message:
```
systemd[1]: Unit getty@tty2.service has alias (null).
```
2022-07-24 20:51:27 +09:00
Yu Watanabe
978642b633
Merge pull request #24020 from yuwata/network-rfkill
...
network: fix wlan interface handling when its RF is killed
2022-07-24 13:01:50 +09:00
Yu Watanabe
cd331a6d51
Merge pull request #23828 from yuwata/nfnl-cleanups
...
sd-netlink: several cleanups for netfilter
2022-07-24 13:01:28 +09:00
Yu Watanabe
573bb24df7
sd-netlink: introduce sd_nfnl_{send,call}_batch()
...
This also introduces sd_nfnl_message_new() which can be also used for
non-nftables subsystems.
2022-07-24 00:16:21 +09:00
Yu Watanabe
04d2003718
sd-netlink: do not compare pointer with 0
2022-07-24 00:05:32 +09:00
Yu Watanabe
665bc9e6e2
firewall-util: introduce nfnl_close_expr_container() helper function
...
And merge nfnl_add_expr_lookup_set() and nfnl_add_expr_lookup_map().
2022-07-24 00:05:32 +09:00
Yu Watanabe
df7371708e
sd-netlink: merge sd_nfnl_nft_message_{new,del}_setelems_begin()
...
And this makes the new merged function `sd_nfnl_nft_message_new_setelems()`
not open container, as containers should be opened and closed in the
same function in general. Otherwise, it is hard to understand which
level we are in the nested attribute tree.
2022-07-24 00:05:09 +09:00
Yu Watanabe
9d884ac36d
sd-netlink: drop unused sd_nfnl_nft_message_del_table()
2022-07-23 23:52:42 +09:00
Yu Watanabe
2c08455eed
sd-netlink: introduce sd_netlink_message_append_container_data()
2022-07-23 23:52:42 +09:00
Yu Watanabe
64f090a61a
sd-netlink: several cleanups for netfilter
...
- rename family -> nfproto, and other arguments,
- check specified nfproto,
- change type of several function arguments that specify data length,
- add several assertions,
- drop unnecessary headers.
2022-07-23 23:52:42 +09:00
Yu Watanabe
35cca046cf
firewall-util: drop unnecessary string attribute
...
As `sd_netlink_message_open_container_union()` also appends the string
attribute.
2022-07-23 23:52:42 +09:00
Yu Watanabe
295942cb46
firewall-util-nft: various cleanups
...
- add missing assertions,
- align enum elements,
- use cleanup attribute, and so on.
2022-07-23 23:52:35 +09:00
Yu Watanabe
8547260579
tree-wide: drop unnecessary inclusion of netlink-util.h
2022-07-23 23:31:23 +09:00
Yu Watanabe
13c026ca83
sd-netlink: move rtnl_message_type_is_*() to netlink-message-rtnl.c
2022-07-23 23:31:23 +09:00
Yu Watanabe
a9d2d037ee
network: do not try to bring up wifi interface if rfkill is active
...
This fixes the following error:
---
systemd-networkd[465]: wlan0: Could not bring up interface: Operation not possible due to RF-kill
---
Fixes #23649 .
2022-07-23 20:55:03 +09:00
Yu Watanabe
8642e04b78
network: also assign rfkill device to Wiphy object
...
Preparation for later commits.
2022-07-23 20:55:03 +09:00
Yu Watanabe
c49d536295
network: assign corresponding sd-device object to Wiphy object
...
As an analogy for Link object, let's each Wiphy object has the
corresponding sd-device object. The sd-device object will be used in
later commits.
2022-07-23 20:55:02 +09:00
Yu Watanabe
fc85b32302
network: set wiphy name in wiphy_new()
...
Then, we can assume all Wiphy objects managed by Manager has both valid
index and name.
2022-07-23 20:53:06 +09:00
Yu Watanabe
71cdfe16aa
network: add TODO about interface renaming
2022-07-23 20:04:28 +09:00
Yu Watanabe
75255a8d43
network: unref sd-device object assigned to Link on remove uevent
...
Otherwise, outdated device information may be used in a short timespan.
2022-07-23 20:04:28 +09:00
Yu Watanabe
1fd3ac1eef
network: introduce a tiny wrapper for manager_udev_process_link()
...
Preparation for later commits.
2022-07-23 20:04:22 +09:00
Yu Watanabe
8de56fb3e0
network: rename Link.sd_device -> Link.dev
2022-07-23 20:00:44 +09:00
Yu Watanabe
32ab27afe8
test-network: reload udevd when .link file is copied/removed
2022-07-23 15:05:22 +09:00
Yu Watanabe
009b2c3ac1
udev-builtin: logs when needs reloading
2022-07-23 15:05:22 +09:00
Yu Watanabe
e9d1fae3bb
udev: reload rules and builtins only when mtime of a config changed
...
This makes udevd reload rules only when the timestamp is updated,
even on SIGHUP or `udevadm control --reload`.
So, we can call `udevadm control --reload` without huge performance
penalty when no rules, .link files, and so on are changed.
2022-07-23 15:05:22 +09:00
Yu Watanabe
acfbd71ccc
udev: save stats of all udev rules file
...
The mtime of directory is not updated when an existing rule file is
changed. Hence, paths_check_timestamp() is not reliable.
2022-07-23 15:05:22 +09:00
Yu Watanabe
3f4dfd9d87
conf-parser: add a boolean flag for config_get_stats_by_path() to control if drop-in configs are checked
...
Preparation for later commits.
2022-07-23 15:03:48 +09:00
Yu Watanabe
d7bddfa109
udev: delay to start queued events on udevadm control --start-exec-queue
2022-07-23 14:08:40 +09:00
Yu Watanabe
8e543eb86a
udev: use event_reset_time_relative()
2022-07-23 14:08:40 +09:00
Yu Watanabe
6e40ed5325
udev: downgrade error level and mention that the error is ignored
2022-07-23 14:08:40 +09:00
Yu Watanabe
298316ebdf
udev: fix error check
2022-07-23 14:08:40 +09:00
codefiles
5e81e84c86
man: Fix typo
2022-07-23 11:18:23 +09:00
Yu Watanabe
853188db90
network: use device_unref_and_replace()
2022-07-23 08:17:43 +09:00
Yu Watanabe
d6985e76f2
sd-device: introduce device_unref_and_replace()
2022-07-23 08:16:38 +09:00
Yu Watanabe
5eb83e9000
sd-device: introduce device_clear_sysattr_cache()
2022-07-23 08:11:36 +09:00
Yu Watanabe
2829fca249
sd-device: introduce device_get_sysattr_bool()
2022-07-23 08:11:36 +09:00
Yu Watanabe
b05e52000b
network: do not silently stop to process configuration on activation failure
...
Previously, if activation failed, link did not enter the failed state,
but still Link.activated flag not set. Hence, nothing processed even if
the interface is manually brought up later.
Partially fixes #23649 .
2022-07-23 08:11:36 +09:00
Yu Watanabe
c9fbe0bd10
Merge pull request #24074 from yuwata/network-dhcp6-rapid-commit
...
network: dhcp6: re-introduce RapidCommit= setting
2022-07-23 08:10:01 +09:00