]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
gpt-auto-generator: do not write "noauto" in unit options
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 24 Nov 2022 12:45:11 +0000 (13:45 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 5 Dec 2022 07:42:04 +0000 (08:42 +0100)
"auto"/"noauto" only make sense in the fstab. Putting them in Options= in the
generated unit has no effect and is confusing.

src/gpt-auto-generator/gpt-auto-generator.c

index 23a215231ca7063bc86d04322f939b76962888c4..f2f6cc1a53d901c9e2fc147acc7b75795dea165c 100644 (file)
@@ -358,23 +358,19 @@ static int add_automount(
 
         _cleanup_free_ char *unit = NULL, *p = NULL;
         _cleanup_fclose_ FILE *f = NULL;
-        const char *opt = "noauto";
         int r;
 
         assert(id);
         assert(where);
         assert(description);
 
-        if (options)
-                opt = strjoina(options, ",", opt);
-
         r = add_mount(id,
                       what,
                       where,
                       fstype,
                       rw,
                       growfs,
-                      opt,
+                      options,
                       description,
                       NULL);
         if (r < 0)