]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fstab-generator: also skip other network filesystems and live image
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 5 Jan 2022 13:06:03 +0000 (22:06 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 6 Jan 2022 11:14:35 +0000 (20:14 +0900)
src/fstab-generator/fstab-generator.c

index 4b254b087df95e7b1b9460f8c15b71fec2067434..9b32383a76637bd5f237cdbd481a2e791580d5f3 100644 (file)
@@ -769,6 +769,21 @@ static int add_sysroot_mount(void) {
                 return 0;
         }
 
+        if (startswith(arg_root_what, "cifs://")) {
+                log_debug("Skipping root directory handling, as root on CIFS was requested.");
+                return 0;
+        }
+
+        if (startswith(arg_root_what, "iscsi:")) {
+                log_debug("Skipping root directory handling, as root on iSCSI was requested.");
+                return 0;
+        }
+
+        if (startswith(arg_root_what, "live:")) {
+                log_debug("Skipping root directory handling, as root on live image was requested.");
+                return 0;
+        }
+
         if (streq(arg_root_what, "tmpfs")) {
                 /* If root=tmpfs is specified, then take this as shortcut for a writable tmpfs mount as root */