# statd - NSM status monitor description "NSM status monitor" author "Steve Langasek " # ON_BOOT is set to y in portmap's special portmap-boot.conf # It will not be set when users run 'restart portmap' or 'start portmap' # This is so that we don't start until we have local filesystems on # bootup but we also restart whenever portmap is restarted. -Clint Byrum # # The case where we need to make sure statd is started on mounting # TYPE=nfs is handled in the "statd-mounting" job. # start on (started portmap ON_BOOT= or (local-filesystems and started portmap ON_BOOT=y)) stop on stopping portmap expect fork respawn env DEFAULTFILE=/etc/default/nfs-common pre-start script if [ -f "$DEFAULTFILE" ]; then . "$DEFAULTFILE" fi [ "x$NEED_STATD" != xno ] || { stop; exit 0; } logger -t statd-pre-start "$UPSTART_EVENTS" || true echo UPSTART_EVENTS = "$UPSTART_EVENTS" # This will block if portmap is mid-starting start portmap-wait WAITER=statd exec sm-notify end script script if [ -f "$DEFAULTFILE" ]; then . "$DEFAULTFILE" fi if [ "x$NEED_STATD" != xno ]; then exec rpc.statd -L $STATDOPTS fi end script