]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
nfs: suppress error message about missing passwd
authorHarald Hoyer <harald@redhat.com>
Wed, 10 Feb 2010 17:54:31 +0000 (18:54 +0100)
committerHarald Hoyer <harald@redhat.com>
Wed, 10 Feb 2010 17:54:31 +0000 (18:54 +0100)
modules.d/95nfs/install

index ea2d43262cfb4bc722ad64ea3eae9f5d57fcd504..004099c9bdc8f1ab577433c5378765773349019a 100755 (executable)
@@ -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"