summaryrefslogtreecommitdiff
path: root/src/fstab-generator
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-01-05 22:06:03 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-01-06 20:14:35 +0900
commit155e1bb4e7cf87191007488cf6a68a558a16eca1 (patch)
tree9a352fe05193b754fdbd48c6e7e6e7ecf0e44bf2 /src/fstab-generator
parent77b8e92de8264c0b656a7d2fb437dd8d598ab597 (diff)
downloadsystemd-155e1bb4e7cf87191007488cf6a68a558a16eca1.tar.gz
fstab-generator: also skip other network filesystems and live image
Diffstat (limited to 'src/fstab-generator')
-rw-r--r--src/fstab-generator/fstab-generator.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index 4b254b087d..9b32383a76 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 */