]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fstab-generator: ignore root=/dev/nfs (#3591)
authorHarald Hoyer <harald@redhat.com>
Thu, 23 Jun 2016 16:47:03 +0000 (17:47 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 23 Jun 2016 16:47:03 +0000 (18:47 +0200)
root=/dev/nfs is a legacy option for the kernel to handle root on NFS.

Documentation for this kernel command line option
can be found in the kernel source tree:

Documentation/filesystems/nfs/nfsroot.txt

src/fstab-generator/fstab-generator.c

index fc7cf39847e003f687db95ea431a0c89e1e92e37..880dc1bd2a41cfcc3979a6794c2fe412df5f313c 100644 (file)
@@ -502,6 +502,12 @@ static int add_sysroot_mount(void) {
                 return 0;
         }
 
+        if (streq(arg_root_what, "/dev/nfs")) {
+                /* This is handled by the kernel or the initrd */
+                log_debug("Skipping root directory handling, as /dev/nfs was requested.");
+                return 0;
+        }
+
         what = fstab_node_to_udev_node(arg_root_what);
         if (!what)
                 return log_oom();