File: rpcbind.upstart

package info (click to toggle)
rpcbind 0.2.3-0.6
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 992 kB
  • ctags: 667
  • sloc: ansic: 5,572; sh: 1,372; makefile: 121
file content (41 lines) | stat: -rw-r--r-- 1,083 bytes parent folder | download
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
39
40
41
# 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=
	if [ -z "$ON_BOOT" ]; then
		OPTIONS=-w
	fi
	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