X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage3%2Fbootscripts%2Fportmap;h=86796d5f49d530543c43284e576ff6811bc26d31;hb=b52e126da767e24fe3c00d2328f4190f290a84fe;hp=9a54dc4d573322e03fde2fbb3b9ad48f7bf67948;hpb=be41960e19c9daee738916df4138559a262ca34a;p=hvlinux.git diff --git a/stage3/bootscripts/portmap b/stage3/bootscripts/portmap index 9a54dc4..86796d5 100755 --- a/stage3/bootscripts/portmap +++ b/stage3/bootscripts/portmap @@ -1,26 +1,40 @@ #!/bin/sh # portmap +# 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/portmap +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 "portmap start" loadproc portmap + cmd_run_log_box_warn "${DAEMON_DESC} start" loadproc ${DAEMON} ${DAEMON_OPTS} ;; stop) - cmd_run_log_box_warn "portmap stop" killproc portmap + cmd_run_log_box_warn "${DAEMON_DESC} stop" killproc ${DAEMON} ;; - + reload) - reloadproc portmap + reloadproc ${DAEMON} ;; - + restart) $0 stop sleep 1 @@ -28,9 +42,9 @@ case "$1" in ;; status) - statusproc portmap + statusproc ${DAEMON} ;; - + *) echo "Usage: $0 {reload|restart|start|status|stop}" exit ${EXIT_CODE_FAILURE}