From: Harald Hoyer Date: Wed, 10 Feb 2010 17:54:31 +0000 (+0100) Subject: nfs: suppress error message about missing passwd X-Git-Tag: 005~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a39ea24f10bb3ecb6fa49f51c80de69107618159;p=thirdparty%2Fdracut.git nfs: suppress error message about missing passwd --- diff --git a/modules.d/95nfs/install b/modules.d/95nfs/install index ea2d43262..004099c9b 100755 --- a/modules.d/95nfs/install +++ b/modules.d/95nfs/install @@ -36,7 +36,7 @@ mkdir -p "$initdir/var/lib/nfs/statd/sm" # Rather than copy the passwd file in, just set a user for rpcbind # We'll save the state and restart the daemon from the root anyway -egrep '^root:' "$initdir/etc/passwd" || echo 'root:x:0:0::/:/bin/sh' >> "$initdir/etc/passwd" +egrep '^root:' "$initdir/etc/passwd" 2>/dev/null || echo 'root:x:0:0::/:/bin/sh' >> "$initdir/etc/passwd" egrep '^nobody:' /etc/passwd >> "$initdir/etc/passwd" egrep '^nfsnobody:' /etc/passwd >> "$initdir/etc/passwd" egrep '^rpc:' /etc/passwd >> "$initdir/etc/passwd"