PageRenderTime 133ms CodeModel.GetById 131ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/init/portmap.conf

http://github.com/brinkman83/bashrc
Config | 42 lines | 33 code | 9 blank | 0 comment | 0 complexity | eda7ee0018f445211226c077bdbeb6a8 MD5 | raw file
 1# portmap - RPC port mapper
 2
 3# Portmap is a server that converts RPC (Remote Procedure Call) program
 4# numbers into DARPA protocol port numbers. It must be running in order
 5# to make RPC calls.
 6
 7description	"RPC port mapper"
 8author		"Steve Langasek <steve.langasek@canonical.com>"
 9
10start on (virtual-filesystems
11          and net-device-up IFACE=lo)
12
13expect fork
14respawn
15
16script
17	if [ -f /etc/default/portmap ]; then
18		. /etc/default/portmap
19	elif [ -f /etc/portmap.conf ]; then
20		. /etc/portmap.conf
21	fi
22
23	exec portmap $OPTIONS
24end script
25
26post-start script
27	if [ -f /var/run/portmap.state ]; then
28		pmap_set < /var/run/portmap.state
29		rm -f /var/run/portmap.state
30	fi
31	mkdir -p /lib/init/rw/sendsigs.omit.d
32	rm -f /lib/init/rw/sendsigs.omit.d/portmap
33	ln -s /var/run/portmap.pid /lib/init/rw/sendsigs.omit.d/portmap
34end script
35
36pre-stop script
37	pmap_dump > /var/run/portmap.state
38end script
39
40post-stop script
41	rm -f /lib/init/rw/sendsigs.omit.d/portmap
42end script