Silence the printing out root entry of passwd file
while including base module.
dracut: *** Including module: base ***
root:x:0:0:root:/root:/bin/bash
dracut: *** Including module: fs-lib ***
# add common users in /etc/passwd, it will be used by nfs/ssh currently
# use password for hostonly images to facilitate secure sulogin in emergency console
[[ $hostonly ]] && pwshadow='x'
- grep '^root:' "$initdir/etc/passwd" 2> /dev/null || echo "root:$pwshadow:0:0::/root:/bin/sh" >> "$initdir/etc/passwd"
+ grep '^root:' "$initdir/etc/passwd" > /dev/null 2>&1 || echo "root:$pwshadow:0:0::/root:/bin/sh" >> "$initdir/etc/passwd"
grep '^nobody:' "$dracutsysrootdir"/etc/passwd >> "$initdir/etc/passwd"
[[ $hostonly ]] && grep '^root:' "$dracutsysrootdir"/etc/shadow >> "$initdir/etc/shadow"