From 155e1bb4e7cf87191007488cf6a68a558a16eca1 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 5 Jan 2022 22:06:03 +0900 Subject: [PATCH] fstab-generator: also skip other network filesystems and live image --- src/fstab-generator/fstab-generator.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index 4b254b087df..9b32383a766 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -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 */ -- 2.47.3