summaryrefslogtreecommitdiff
blob: f2fe6ec43dc7625b55b130f3c760cc1bf074d2f7 (plain)
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
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-fs/idmapd/files/idmapd.rc,v 1.5 2004/11/08 05:08:15 vapier Exp $

depend() {
	need net
}

start() {
	[ ! -d /var/lib/rpc_pipes ] && mkdir -p /var/lib/rpc_pipes

	if grep -q rpc_pipefs /proc/filesystems ; then
		if ! grep -q "rpc_pipefs /var/lib/rpc_pipes" /proc/mounts ; then
			ebegin "Mounting RPC pipefs"
			mount -t rpc_pipefs rpc_pipefs /var/lib/rpc_pipes
			eend $? "Error mounting RPC pipefs"
		fi
	fi

	ebegin "Starting idmapd"
	/sbin/idmapd -p /var/lib/rpc_pipes ${IDMAPD_OPTS}
	eend $?
}

stop() {
	ebegin "Stopping idmapd"
	start-stop-daemon --stop --quiet --exec /sbin/idmapd
	eend $?

	ebegin "Unmounting RPC pipefs"
	umount /var/lib/rpc_pipes
	eend $? "Error unmounting RPC pipefs"
}