network: don't use "ifup -m"
[dracut.git] / modules.d / 95nfs / nfs-start-rpc.sh
blob19bb0f6d17f33cdb9664f898537b4d46335d3c2e
1 #!/bin/sh
4 if modprobe sunrpc || strstr "$(cat /proc/filesystems)" rpc_pipefs; then
6 [ ! -d /var/lib/nfs/rpc_pipefs/nfs ] && \
7 mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
9 # Start rpcbind or rpcbind
10 # FIXME occasionally saw 'rpcbind: fork failed: No such device' -- why?
11 command -v portmap >/dev/null && [ -z "$(pidof portmap)" ] && portmap
12 command -v rpcbind >/dev/null && [ -z "$(pidof rpcbind)" ] && rpcbind
14 # Start rpc.statd as mount won't let us use locks on a NFSv4
15 # filesystem without talking to it. NFSv4 does locks internally,
16 # rpc.lockd isn't needed
17 [ -z "$(pidof rpc.statd)" ] && rpc.statd
18 [ -z "$(pidof rpc.idmapd)" ] && rpc.idmapd
19 else
20 warn 'Kernel module "sunrpc" not in the initramfs, or support for filesystem "rpc_pipefs" missing!'