]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
nfs/nfsroot.sh: only cat /etc/fstab, if existant
authorHarald Hoyer <harald@redhat.com>
Thu, 14 Mar 2013 16:56:53 +0000 (17:56 +0100)
committerHarald Hoyer <harald@redhat.com>
Thu, 14 Mar 2013 17:30:35 +0000 (18:30 +0100)
modules.d/95nfs/nfsroot.sh

index 803a71f33037ace9200e078a88d430a8f89aa343..067d1726d3d8d4f4bff533e4fb9544de569c60f8 100755 (executable)
@@ -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