dracut/modules.d/95nfs/check

16 lines
544 B
Bash
Executable File

#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
# We depend on network modules being loaded
[ "$1" = "-d" ] && echo network
# If hostonly was requested, fail the check if we are not actually
# booting from root.
[ "$1" = "-h" ] && ! egrep -q '/ nfs[34 ]' /proc/mounts && exit 1
# If our prerequisites are not met, fail anyways.
type -P rpcbind >/dev/null || type -P portmap >/dev/null || exit 1
type -P rpc.statd mount.nfs mount.nfs4 umount >/dev/null || exit 1
exit 0