#!/bin/bash -p
# nfsmount calls this script when mounting a filesystem with locking
# enabled, but when statd does not seem to be running (based on
# /var/run/rpc.statd.pid).
# It should run statd with whatever flags are apropriate for this
# site.

PATH=/sbin:/usr/sbin:/bin
# Read config
DEFAULTFILE=/etc/default/nfs-common
NEED_IDMAPD=
if [ -f $DEFAULTFILE ]; then
    . $DEFAULTFILE
fi

if systemctl start statd.service 2>/dev/null
then :
else
    exec rpc.statd --no-notify $STATDOPTS
fi
