base-files: preinit: get rid of /dev/null redirections and use grep -q where applicable