diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-12-17 18:37:08 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-12-17 18:48:08 +0100 |
commit | 1ff493d5c1155ed791a1ae2e0264b5f2213c5765 (patch) | |
tree | 7927e193218c1549f7485fea2ea63ccf3ef6a000 | |
parent | 47fb161e3a72c65071038eddbd84108504155b77 (diff) | |
download | systemd-1ff493d5c1155ed791a1ae2e0264b5f2213c5765.tar.gz |
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.
-rw-r--r-- | man/bootctl.xml | 7 | ||||
-rw-r--r-- | src/boot/bootctl.c | 6 |
2 files changed, 5 insertions, 8 deletions
diff --git a/man/bootctl.xml b/man/bootctl.xml index 91dbb3a6e8..16c4985796 100644 --- a/man/bootctl.xml +++ b/man/bootctl.xml @@ -258,14 +258,11 @@ </varlistentry> <varlistentry> - <term><option>--make-machine-id-directory=yes|no|auto</option></term> + <term><option>--make-machine-id-directory=yes|no</option></term> <listitem><para>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>--print-boot-path</option> option, see above) during <option>install</option> and - <option>remove</option>, respectively. <literal>auto</literal> is equivalent to - <literal>yes</literal> if <filename>/etc/machine-id</filename> resides on a filesystem other than - tmpfs and <literal>no</literal> otherwise (in the latter case the machine ID is likely transient and - hence should not be used persistently in the ESP). Defaults to <literal>auto</literal>. See + <option>remove</option>, respectively. Defaults to <literal>no</literal>. See <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry> for details about the machine ID concept and file.</para> diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c index 8f89a309e8..e1e56cf923 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) |