]> git.pld-linux.org Git - packages/rpcbind.git/blame - rpcbind.init
- added systemd package
[packages/rpcbind.git] / rpcbind.init
CommitLineData
374a4481
JR
1#!/bin/sh
2#
3# rpcbind Start/Stop RPC universal addresses to RPC program number mapper
4#
5# chkconfig: 345 11 89
6#
7# description: The rpcbind utility is a server that converts RPC program \
8# numbers into universal addresses. It must be running on \
9# the host to be able to make RPC calls on a server on that \
10# machine.
11# processname: rpcbind
12
13
14# Source function library
15. /etc/rc.d/init.d/functions
16
17# Get network config
18. /etc/sysconfig/network
19
20# Get service config
21[ -f /etc/sysconfig/rpcbind ] && . /etc/sysconfig/rpcbind
22
23# Check that networking is up.
24if is_yes "${NETWORKING}"; then
25 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
26 msg_network_down rpcbind
27 exit 1
28 fi
29else
30 exit 0
31fi
32
33start() {
34 # Check if the service is already running?
35 if [ ! -f /var/lock/subsys/rpcbind ]; then
374a4481 36 msg_starting rpcbind
7a5b9a75 37 daemon rpcbind -w $RPCBIND_OPTIONS
374a4481
JR
38 RETVAL=$?
39 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rpcbind
40 else
41 msg_already_running rpcbind
42 fi
43}
44
45stop() {
46 if [ -f /var/lock/subsys/rpcbind ]; then
47 msg_stopping rpcbind
48 killproc rpcbind
49 rm -f /var/lock/subsys/rpcbind
50 else
51 msg_not_running rpcbind
52 fi
53}
54
55RETVAL=0
56# See how we were called.
57case "$1" in
58 start)
374a4481
JR
59 start
60 ;;
61 stop)
62 stop
63 ;;
64 cleanup)
65 stop
374a4481
JR
66 start
67 ;;
68 restart|force-reload)
69 stop
374a4481
JR
70 start
71 ;;
72 status)
73 status rpcbind
74 exit $?
75 ;;
76 *)
77 msg_usage "$0 {start|stop|restart|force-reload|cleanup|status}"
78 exit 3
79esac
80
81exit $RETVAL
This page took 0.057522 seconds and 4 git commands to generate.