From 1ff493d5c1155ed791a1ae2e0264b5f2213c5765 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 17 Dec 2021 18:37:08 +0100 Subject: [PATCH] bootctl: deprecate --make-machine-id-directory=auto Now that kernel-install creates the machine-id directory, we don't need to do this is 'bootctl install', and in fact it's better not to do this since it might never be necessary. So let's change the default behaviour to 'no'. I kept support for 'auto' to maintain backwards compatibility, even though the default was changed. Previous behaviour can be requested by specifying --make-machine-id-directory=auto. --- man/bootctl.xml | 7 ++----- src/boot/bootctl.c | 6 +++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/man/bootctl.xml b/man/bootctl.xml index 91dbb3a6e86..16c49857968 100644 --- a/man/bootctl.xml +++ b/man/bootctl.xml @@ -258,14 +258,11 @@ - + Control creation and deletion of the top-level machine ID directory on the file system containing boot loader entries (i.e. beneath the file system returned by the option, see above) during and - , respectively. auto is equivalent to - yes if /etc/machine-id resides on a filesystem other than - tmpfs and no otherwise (in the latter case the machine ID is likely transient and - hence should not be used persistently in the ESP). Defaults to auto. See + , respectively. Defaults to no. See machine-id5 for details about the machine ID concept and file. diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c index 8f89a309e82..e1e56cf923e 100644 --- a/src/boot/bootctl.c +++ b/src/boot/bootctl.c @@ -55,7 +55,7 @@ static bool arg_print_dollar_boot_path = false; static bool arg_touch_variables = true; static PagerFlags arg_pager_flags = 0; static bool arg_graceful = false; -static int arg_make_machine_id_directory = -1; +static int arg_make_machine_id_directory = 0; static sd_id128_t arg_machine_id = SD_ID128_NULL; static char *arg_install_layout = NULL; @@ -1347,8 +1347,8 @@ static int parse_argv(int argc, char *argv[]) { break; case ARG_MAKE_MACHINE_ID_DIRECTORY: - if (streq(optarg, "auto")) - arg_make_machine_id_directory = -1; /* default */ + if (streq(optarg, "auto")) /* retained for backwards compatibility */ + arg_make_machine_id_directory = -1; /* yes if machine-id is permanent */ else { r = parse_boolean_argument("--make-machine-id-directory=", optarg, &b); if (r < 0) -- 2.47.3