diff --git a/NEWS b/NEWS index e7b673d6500..cd9965aaded 100644 --- a/NEWS +++ b/NEWS @@ -1390,7 +1390,7 @@ CHANGES WITH 254: user is notified (graphically via Plymouth – if available – as well as in text form on the console), and the system is turned off after a 10s delay. The feature can be disabled by passing - systemd.battery-check=0 through the kernel command line. + systemd.battery_check=0 through the kernel command line. * The 'passwdqc' library is now supported as an alternative to the 'pwquality' library and can be selected at build time. @@ -3718,7 +3718,7 @@ CHANGES WITH 250: interfaces. The Kind= setting in .netdev file accepts "ipoib". And systemd.netdev files gained the [IPoIB] section. - * systemd-networkd and systemd-udevd now support net.ifname-policy= + * systemd-networkd and systemd-udevd now support net.ifname_policy= option on the kernel command-line. This is implemented through the systemd-network-generator service that automatically generates appropriate .link, .network, and .netdev files. @@ -4290,7 +4290,7 @@ CHANGES WITH 249: - Invalid characters in interface names are replaced with "_". The new version of the net naming scheme is "v249". The previous - scheme can be selected via the "net.naming-scheme=v247" kernel + scheme can be selected via the "net.naming_scheme=v247" kernel command line parameter. * sd-bus' sd_bus_is_ready() and sd_bus_is_open() calls now accept a @@ -5821,7 +5821,7 @@ CHANGES WITH 247: bridge. Since this is a naming scheme incompatibility on systems that possess hardware like this it has been introduced as new naming scheme "v247". The previous scheme can be selected via the - "net.naming-scheme=v245" kernel command line parameter. + "net.naming_scheme=v245" kernel command line parameter. * ConditionFirstBoot= semantics have been modified to be safe towards abnormal system power-off during first boot. Specifically, the @@ -6034,12 +6034,12 @@ CHANGES WITH 246: added, which may be used to turn off automatic activation of swap devices listed in /etc/fstab. - * New kernel command line options systemd.condition-needs-update= and - systemd.condition-first-boot= have been added, which override the + * New kernel command line options systemd.condition_needs_update= and + systemd.condition_first_boot= have been added, which override the result of the ConditionNeedsUpdate= and ConditionFirstBoot= conditions. - * A new kernel command line option systemd.clock-usec= has been added + * A new kernel command line option systemd.clock_usec= has been added that allows setting the system clock to the specified time in µs since Jan 1st, 1970 early during boot. This is in particular useful in order to make test cases more reliable. @@ -6726,7 +6726,7 @@ CHANGES WITH 245: multiple containers whose names all begin with the same prefix. Since this changes the primary interface names pointing to containers if truncation happens, the old scheme may still be requested by - selecting an older naming scheme, via the net.naming-scheme= kernel + selecting an older naming scheme, via the net.naming_scheme= kernel command line option. * PrivateUsers= in service files now works in services run by the @@ -7256,9 +7256,9 @@ CHANGES WITH 243: Moreover, the "en" prefix was dropped from the ID_NET_NAME_ONBOARD udev property. - Those two changes form a new net.naming-policy-scheme= entry. - Distributions which want to preserve naming stability may want to set - the -Ddefault-net-naming-scheme= configuration option. + Those two changes form a new net.naming_scheme= entry. Distributions + which want to preserve naming stability may want to set the + -Ddefault-net-naming-scheme= configuration option. * systemd-networkd now supports MACsec, nlmon, IPVTAP and Xfrm interfaces natively. @@ -8333,7 +8333,7 @@ CHANGES WITH 240: name as argument. * systemd-udevd's network naming logic now understands a new - net.naming-scheme= kernel command line switch, which may be used to + net.naming_scheme= kernel command line switch, which may be used to pick a specific version of the naming scheme. This helps stabilizing interface names even as systemd/udev are updated and the naming logic is improved. diff --git a/docs/ENVIRONMENT.md b/docs/ENVIRONMENT.md index eab1ce23e46..d55bcaf802f 100644 --- a/docs/ENVIRONMENT.md +++ b/docs/ENVIRONMENT.md @@ -252,7 +252,7 @@ All tools: when determining stable network interface names. This may be used to revert to naming schemes of older udev versions, in order to provide more stable naming across updates. This environment variable takes precedence over the - kernel command line option `net.naming-scheme=`, except if the value is + kernel command line option `net.naming_scheme=`, except if the value is prefixed with `:` in which case the kernel command line option takes precedence, if it is specified as well. diff --git a/man/kernel-command-line.xml b/man/kernel-command-line.xml index d4b005f8769..2a951eeea9f 100644 --- a/man/kernel-command-line.xml +++ b/man/kernel-command-line.xml @@ -317,7 +317,7 @@ udev.blockdev_read_only rd.udev.blockdev_read_only net.ifnames= - net.naming-scheme= + net.naming_scheme= Parameters understood by the device event managing @@ -609,7 +609,7 @@ systemd-homed-firstboot.service1 will not query the user for basic system settings, even if the system boots up for the first time and the relevant settings are not initialized yet. Not to be confused with - systemd.condition-first-boot= (see below), which overrides the result of the + systemd.condition_first_boot= (see below), which overrides the result of the ConditionFirstBoot= unit file condition, and thus controls more than just systemd-firstboot.service behaviour. @@ -617,7 +617,7 @@ - systemd.condition-needs-update= + systemd.condition_needs_update= Takes a boolean argument. If specified, overrides the result of ConditionNeedsUpdate= unit condition checks. See @@ -628,7 +628,7 @@ - systemd.condition-first-boot= + systemd.condition_first_boot= Takes a boolean argument. If specified, overrides the result of ConditionFirstBoot= unit condition checks. See @@ -641,7 +641,7 @@ - systemd.clock-usec= + systemd.clock_usec= Takes a decimal, numeric timestamp in μs since January 1st 1970, 00:00am, to set the system clock to. The system time is set to the specified timestamp early during boot. It is not @@ -651,7 +651,7 @@ - systemd.random-seed= + systemd.random_seed= Takes a base64 encoded random seed value to credit with full entropy to the kernel's random pool during early service manager initialization. This option is useful in testing diff --git a/man/systemd-battery-check.service.xml b/man/systemd-battery-check.service.xml index 698e9d7c3f4..a5f564b888f 100644 --- a/man/systemd-battery-check.service.xml +++ b/man/systemd-battery-check.service.xml @@ -66,7 +66,7 @@ - systemd.battery-check=BOOL + systemd.battery_check=BOOL Takes a boolean. If specified with false, systemd-battery-check command diff --git a/man/systemd-network-generator.service.xml b/man/systemd-network-generator.service.xml index 1d498cbf1dd..59d608028a7 100644 --- a/man/systemd-network-generator.service.xml +++ b/man/systemd-network-generator.service.xml @@ -76,7 +76,7 @@ ifname= - net.ifname-policy= + net.ifname_policy= Translated into systemd.link5 diff --git a/man/systemd-udevd.service.xml b/man/systemd-udevd.service.xml index b63ee4bb771..c781765e1cf 100644 --- a/man/systemd-udevd.service.xml +++ b/man/systemd-udevd.service.xml @@ -236,7 +236,7 @@ - net.naming-scheme= + net.naming_scheme= Network interfaces are renamed to give them predictable names when possible (unless net.ifnames=0 is specified, see above). With this kernel command line option it @@ -255,7 +255,7 @@ - net.ifname-policy=policy1[,policy2,…][,MAC] + net.ifname_policy=policy1[,policy2,…][,MAC] Specifies naming policies applied when renaming network interfaces. Takes a list of policies and an optional MAC address separated with comma. Each policy value must be one of @@ -273,8 +273,8 @@ enabled. Example: - net.ifname-policy=keep,kernel,path,slot,onboard,01:23:45:67:89:ab -net.ifname-policy=keep,kernel,path,slot,onboard,mac + net.ifname_policy=keep,kernel,path,slot,onboard,01:23:45:67:89:ab +net.ifname_policy=keep,kernel,path,slot,onboard,mac This is mostly equivalent to creating the following .link files: # 91-name-policy-with-mac.link [Match] diff --git a/man/systemd-update-done.service.xml b/man/systemd-update-done.service.xml index 46bb2f41c88..6b863ecff3a 100644 --- a/man/systemd-update-done.service.xml +++ b/man/systemd-update-done.service.xml @@ -58,7 +58,7 @@ touch1 on it. - Note that if the systemd.condition-needs-update= kernel command line option is + Note that if the systemd.condition_needs_update= kernel command line option is used it overrides the ConditionNeedsUpdate= unit condition checks. In that case systemd-update-done.service will not reset the condition state until a follow-up reboot where the kernel switch is not specified anymore. diff --git a/man/systemd.net-naming-scheme.xml b/man/systemd.net-naming-scheme.xml index 09df42aea27..2fec1055b70 100644 --- a/man/systemd.net-naming-scheme.xml +++ b/man/systemd.net-naming-scheme.xml @@ -38,7 +38,7 @@ implemented version, but it is also possible to set one of the older versions to preserve compatibility. This may be useful for example for distributions, which may introduce new versions of systemd in stable releases without changing the naming scheme. The naming scheme may also be overridden - using the net.naming-scheme= kernel command line switch, see + using the net.naming_scheme= kernel command line switch, see systemd-udevd.service8. Available naming schemes are described below. @@ -326,7 +326,7 @@ History The following "naming schemes" have been defined (which may be chosen at system boot-up time via - the net.naming-scheme= kernel command line switch, see above): + the net.naming_scheme= kernel command line switch, see above): diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 46184f5b7e7..7c11598a941 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -1624,7 +1624,7 @@ to make sure they run before the stamp file's modification time gets reset indicating a completed update. - If the systemd.condition-needs-update= option is specified on the kernel + If the systemd.condition_needs_update= option is specified on the kernel command line (taking a boolean), it will override the result of this condition check, taking precedence over any file modification time checks. If the kernel command line option is used, systemd-update-done.service will not have immediate effect on any following @@ -1673,7 +1673,7 @@ Wants=. This ensures that in a case of an aborted first boot, these units will be re-run during the next system startup. - If the systemd.condition-first-boot= option is specified on the kernel + If the systemd.condition_first_boot= option is specified on the kernel command line (taking a boolean), it will override the result of this condition check, taking precedence over /etc/machine-id existence checks. diff --git a/meson.build b/meson.build index 10404cebd60..e27e944caff 100644 --- a/meson.build +++ b/meson.build @@ -2757,8 +2757,8 @@ summary({ 'default LLMNR mode' : default_llmnr, 'default DNS servers' : dns_servers.split(' '), 'default NTP servers' : ntp_servers.split(' '), - 'default net.naming-scheme value' : default_net_naming_scheme, - 'default KillUserProcesses value' : kill_user_processes, + 'default net.naming_scheme= value': default_net_naming_scheme, + 'default KillUserProcesses= value': kill_user_processes, 'default locale' : default_locale, 'default nspawn locale' : nspawn_locale, 'default status unit format' : status_unit_format_default, diff --git a/meson_options.txt b/meson_options.txt index 51434f74b3b..e9a5f18cd63 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -230,9 +230,9 @@ option('default-hierarchy', type : 'combo', choices : ['legacy', 'hybrid', 'unified'], deprecated : true, description : '''This option is deprecated and will be removed in a future release''') option('extra-net-naming-schemes', type : 'string', - description : 'comma-separated list of extra net.naming-scheme= definitions') + description : 'comma-separated list of extra net.naming_scheme= definitions') option('default-net-naming-scheme', type : 'string', value : 'latest', - description : 'default net.naming-scheme= value') + description : 'default net.naming_scheme= value') option('status-unit-format-default', type : 'combo', choices : ['auto', 'description', 'name', 'combined'], description : 'use unit name or description in messages by default') diff --git a/src/battery-check/battery-check.c b/src/battery-check/battery-check.c index 03628c8b921..1563147b7b6 100644 --- a/src/battery-check/battery-check.c +++ b/src/battery-check/battery-check.c @@ -123,9 +123,9 @@ static int run(int argc, char *argv[]) { log_setup(); - r = proc_cmdline_get_bool("systemd.battery-check", PROC_CMDLINE_STRIP_RD_PREFIX|PROC_CMDLINE_TRUE_WHEN_MISSING, &arg_doit); + r = proc_cmdline_get_bool("systemd.battery_check", PROC_CMDLINE_STRIP_RD_PREFIX|PROC_CMDLINE_TRUE_WHEN_MISSING, &arg_doit); if (r < 0) - log_warning_errno(r, "Failed to parse systemd.battery-check= kernel command line option, ignoring: %m"); + log_warning_errno(r, "Failed to parse systemd.battery_check= kernel command line option, ignoring: %m"); r = parse_argv(argc, argv); if (r <= 0) diff --git a/src/core/main.c b/src/core/main.c index be6d07b333c..fa0dc3191ac 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -2202,9 +2202,9 @@ static void log_execution_mode(bool *ret_first_boot) { /* Let's check whether we are in first boot. First, check if an override was * specified on the kernel command line. If yes, we honour that. */ - r = proc_cmdline_get_bool("systemd.condition-first-boot", /* flags = */ 0, &first_boot); + r = proc_cmdline_get_bool("systemd.condition_first_boot", /* flags = */ 0, &first_boot); if (r < 0) - log_debug_errno(r, "Failed to parse systemd.condition-first-boot= kernel command line argument, ignoring: %m"); + log_debug_errno(r, "Failed to parse systemd.condition_first_boot= kernel command line argument, ignoring: %m"); if (r > 0) log_full(first_boot ? LOG_INFO : LOG_DEBUG, diff --git a/src/network/generator/network-generator.c b/src/network/generator/network-generator.c index 48527a2c73d..106e10a5752 100644 --- a/src/network/generator/network-generator.c +++ b/src/network/generator/network-generator.c @@ -27,7 +27,7 @@ # .link ifname=: - net.ifname-policy=policy1[,policy2,...][,] # This is an original rule, not supported by other tools. + net.ifname_policy=policy1[,policy2,...][,] # This is an original rule, not supported by other tools. # .netdev vlan=: @@ -1114,7 +1114,7 @@ static int parse_cmdline_ifname_policy(Context *context, const char *key, const assert(context); assert(key); - /* net.ifname-policy=policy1[,policy2,...][,] */ + /* net.ifname_policy=policy1[,policy2,...][,] */ if (proc_cmdline_value_missing(key, value)) return -EINVAL; @@ -1172,23 +1172,23 @@ int parse_cmdline_item(const char *key, const char *value, void *data) { assert(key); - if (streq(key, "ip")) + if (proc_cmdline_key_streq(key, "ip")) return parse_cmdline_ip(context, key, value); - if (streq(key, "rd.route")) + if (proc_cmdline_key_streq(key, "rd.route")) return parse_cmdline_rd_route(context, key, value); - if (streq(key, "nameserver")) + if (proc_cmdline_key_streq(key, "nameserver")) return parse_cmdline_nameserver(context, key, value); - if (streq(key, "rd.peerdns")) + if (proc_cmdline_key_streq(key, "rd.peerdns")) return parse_cmdline_rd_peerdns(context, key, value); - if (streq(key, "vlan")) + if (proc_cmdline_key_streq(key, "vlan")) return parse_cmdline_vlan(context, key, value); - if (streq(key, "bridge")) + if (proc_cmdline_key_streq(key, "bridge")) return parse_cmdline_bridge(context, key, value); - if (streq(key, "bond")) + if (proc_cmdline_key_streq(key, "bond")) return parse_cmdline_bond(context, key, value); - if (streq(key, "ifname")) + if (proc_cmdline_key_streq(key, "ifname")) return parse_cmdline_ifname(context, key, value); - if (streq(key, "net.ifname-policy")) + if (proc_cmdline_key_streq(key, "net.ifname_policy")) return parse_cmdline_ifname_policy(context, key, value); return 0; diff --git a/src/shared/condition.c b/src/shared/condition.c index 385ceee332b..b7d2248b94b 100644 --- a/src/shared/condition.c +++ b/src/shared/condition.c @@ -751,9 +751,9 @@ static int condition_test_needs_update(Condition *c, char **env) { assert(c->parameter); assert(c->type == CONDITION_NEEDS_UPDATE); - r = proc_cmdline_get_bool("systemd.condition-needs-update", /* flags = */ 0, &b); + r = proc_cmdline_get_bool("systemd.condition_needs_update", /* flags = */ 0, &b); if (r < 0) - log_debug_errno(r, "Failed to parse systemd.condition-needs-update= kernel command line argument, ignoring: %m"); + log_debug_errno(r, "Failed to parse systemd.condition_needs_update= kernel command line argument, ignoring: %m"); if (r > 0) return b; diff --git a/src/shared/netif-naming-scheme.c b/src/shared/netif-naming-scheme.c index 38c24760f0a..2955b6e8d57 100644 --- a/src/shared/netif-naming-scheme.c +++ b/src/shared/netif-naming-scheme.c @@ -53,7 +53,7 @@ const NamingScheme* naming_scheme(void) { return cache; /* Acquire setting from the kernel command line */ - (void) proc_cmdline_get_key("net.naming-scheme", 0, &buffer); + (void) proc_cmdline_get_key("net.naming_scheme", 0, &buffer); /* Also acquire it from an env var */ e = getenv("NET_NAMING_SCHEME"); diff --git a/src/tpm2-setup/tpm2-generator.c b/src/tpm2-setup/tpm2-generator.c index 723b31898a9..f1d903ee81a 100644 --- a/src/tpm2-setup/tpm2-generator.c +++ b/src/tpm2-setup/tpm2-generator.c @@ -20,10 +20,10 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat assert(key); - if (proc_cmdline_key_streq(key, "systemd.tpm2-wait")) { + if (proc_cmdline_key_streq(key, "systemd.tpm2_wait")) { r = value ? parse_boolean(value) : 1; if (r < 0) - log_warning_errno(r, "Failed to parse 'systemd.tpm2-wait' kernel command line argument, ignoring: %s", value); + log_warning_errno(r, "Failed to parse 'systemd.tpm2_wait=' kernel command line argument, ignoring: %s", value); else arg_tpm2_wait = r; } diff --git a/units/systemd-battery-check.service.in b/units/systemd-battery-check.service.in index a5f532da707..0f826041078 100644 --- a/units/systemd-battery-check.service.in +++ b/units/systemd-battery-check.service.in @@ -12,7 +12,7 @@ Description=Check battery level during early boot Documentation=man:systemd-battery-check.service(8) ConditionVirtualization=no ConditionDirectoryNotEmpty=/sys/class/power_supply/ -ConditionKernelCommandLine=!systemd.battery-check=0 +ConditionKernelCommandLine=!systemd.battery_check=0 AssertPathExists=/etc/initrd-release DefaultDependencies=no After=plymouth-start.service