From: Yu Watanabe Date: Wed, 5 Jan 2022 13:06:03 +0000 (+0900) Subject: fstab-generator: also skip other network filesystems and live image X-Git-Tag: v251-rc1~573^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=155e1bb4e7cf87191007488cf6a68a558a16eca1;p=thirdparty%2Fsystemd.git fstab-generator: also skip other network filesystems and live image --- 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 */