Blame | Last modification | View Log | RSS feed
#! /bin/sh## rpcbind Start/Stop RPCbind## chkconfig: 2345 13 87# description: The rpcbind utility is a server that converts RPC program \# numbers into universal addresses. It must be running on the \# host to be able to make RPC calls on a server on that machine.## processname: rpcbind# probe: true# config: /etc/sysconfig/rpcbind# This is an interactive program, we need the current locale[ -f /etc/profile.d/lang.sh ] && . /etc/profile.d/lang.sh# We can't Japanese on normal console at boot time, so force LANG=C.if [ "$LANG" = "ja" -o "$LANG" = "ja_JP.eucJP" ]; thenif [ "$TERM" = "linux" ] ; thenLANG=Cfifi# Source function library.. /etc/init.d/functions# Source networking configuration.[ -f /etc/sysconfig/network ] && . /etc/sysconfig/networkprog="rpcbind"[ -f /etc/sysconfig/$prog ] && . /etc/sysconfig/$progRETVAL=0uid=`id | cut -d\( -f1 | cut -d= -f2`start() {# Check that networking is up.[ "$NETWORKING" = "yes" ] || exit 6[ -f /sbin/$prog ] || exit 5# Make sure the rpcbind is not already running.if status $prog > /dev/null ; thenexit 0fi# Only root can start the service[ $uid -ne 0 ] && exit 4echo -n $"Starting $prog: "daemon $prog $1 "$RPCBIND_ARGS"RETVAL=$?echoif [ $RETVAL -eq 0 ] ; thentouch /var/lock/subsys/$prog[ ! -f /var/run/rpcbind.pid ] &&/sbin/pidof $prog > /var/run/rpcbind.pidfireturn $RETVAL}stop() {echo -n $"Stopping $prog: "killproc $progRETVAL=$?echo[ $RETVAL -eq 0 ] && {rm -f /var/lock/subsys/$progrm -f /var/run/rpcbind*}return $RETVAL}# See how we were called.case "$1" instart)startRETVAL=$?;;stop)stopRETVAL=$?;;status)status $progRETVAL=$?;;restart | reload| force-reload)stopstartRETVAL=$?;;condrestart | try-restart)if [ -f /var/lock/subsys/$prog ]; thenstopstart -wRETVAL=$?fi;;*)echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart|try-restart}"RETVAL=2;;esacexit $RETVAL