File: rpcbind.upstart

package info (click to toggle)
rpcbind 0.2.1-6%2Bdeb8u2
  • links: PTS
  • area: main
  • in suites: jessie
  • size: 884 kB
  • ctags: 541
  • sloc: ansic: 5,314; sh: 1,180; makefile: 102
file content (38 lines) | stat: -rw-r--r-- 1,042 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# rpcbind - RPC portmapper replacement

# rpcbind is a server that converts RPC (Remote Procedure Call) program
# numbers into DARPA protocol port numbers. It must be running in order
# to make RPC calls.

# Note that this is called portmap rather than rpcbind because other
# packages rely on the portmap name.

description	"RPC portmapper replacement"
author		"Colin Watson <cjwatson@ubuntu.com>"

start on start-rpcbind
stop on unmounted-remote-filesystems

# ON_BOOT is set on start-rpcbind in rpcbind-boot.conf
# Used by statd which must not start on started portmap during boot
export ON_BOOT
env ON_BOOT=

expect fork
respawn

pre-start exec mkdir -p /run/rpcbind

script
	OPTIONS="-w"
	if [ -f /etc/default/rpcbind ]; then
		. /etc/default/rpcbind
	elif [ -f /etc/rpcbind.conf ]; then
		. /etc/rpcbind.conf
	fi
	exec rpcbind $OPTIONS
end script

# For compatibility with older upstart jobs in Ubuntu
post-start exec initctl emit --no-wait started JOB=portmap ON_BOOT=$ON_BOOT
pre-stop exec initctl emit --no-wait stopping JOB=portmap