dracut/0041-nfs-nfsroot.sh-only-cat-etc-fstab-if-existant.patch
Harald Hoyer 61c4978036 dracut-026-48.git20130315
- use new initrd.target from systemd
- fixed rescue generation
2013-03-15 07:18:23 +01:00

23 lines
826 B
Diff

From 18d0c9b8589b9ffda3543a18676037105d8a48f9 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 14 Mar 2013 17:56:53 +0100
Subject: [PATCH] nfs/nfsroot.sh: only cat /etc/fstab, if existant
---
modules.d/95nfs/nfsroot.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/95nfs/nfsroot.sh b/modules.d/95nfs/nfsroot.sh
index 803a71f..067d172 100755
--- a/modules.d/95nfs/nfsroot.sh
+++ b/modules.d/95nfs/nfsroot.sh
@@ -18,7 +18,7 @@ nfs_to_var $root $netif
mount_nfs $root $NEWROOT $netif && { [ -e /dev/root ] || ln -s null /dev/root ; }
-cat $NEWROOT/etc/fstab > /dev/null
+[ -f $NEWROOT/etc/fstab ] && cat $NEWROOT/etc/fstab > /dev/null
# inject new exit_if_exists
echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm "$job"' > $hookdir/initqueue/nfs.sh