#!/bin/sh # rpcbind # Needed by both the NFS server and client # Source functions library source /etc/rc.d/init.d/functions log_script_name "$0 $*" # Load global network parameters source /etc/sysconfig/network/network-parameters DAEMON=/sbin/rpcbind DAEMON_DESC="RPC port mapper" DAEMON_OPTS="" # Check if NFS server must be enabled #if [ "x${NFS_SERVER_ENA}" != "xyes" -a "x${NFS_SERVER_ENA}" != "xYes" #-a "x${NFS_SERVER_ENA}" != "xYES" ]; then # exit ${EXIT_CODE_SUCCESS} #fi # See how we were called case "$1" in start) cmd_run_log_box_warn "${DAEMON_DESC} start" loadproc ${DAEMON} ${DAEMON_OPTS} ;; stop) cmd_run_log_box_warn "${DAEMON_DESC} stop" killproc ${DAEMON} ;; reload) reloadproc ${DAEMON} ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc ${DAEMON} ;; *) echo "Usage: $0 {reload|restart|start|status|stop}" exit ${EXIT_CODE_FAILURE} ;; esac exit $?