~upstart-devel/upstart/upstart-jobs

« back to all changes in this revision

Viewing changes to utopic/etc/init/idmapd.conf

  • Committer: Dimitri John Ledkov
  • Date: 2014-11-19 12:58:41 UTC
  • Revision ID: dimitri.j.ledkov@intel.com-20141119125841-98dr37roy8dvcv3b
auto update

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# idmapd - NFSv4 id <-> name mapper
2
 
 
3
 
# rpc.idmapd is the NFSv4 ID <-> name mapping daemon.  It provides
4
 
# functionality to the NFSv4 kernel client and server, to which it
5
 
# communicates via upcalls, by translating user and group IDs to names, and
6
 
# vice versa.
7
 
 
8
 
description     "NFSv4 id <-> name mapper"
9
 
author          "Steve Langasek <steve.langasek@canonical.com>"
10
 
 
11
 
start on local-filesystems
12
 
stop on unmounted-remote-filesystems
13
 
 
14
 
expect fork
15
 
respawn
16
 
 
17
 
env PIPEFS_MOUNTPOINT=/run/rpc_pipefs
18
 
 
19
 
pre-start script
20
 
        do_modprobe() {
21
 
                modprobe -q "$1" || true
22
 
        }
23
 
 
24
 
        do_modprobe nfs
25
 
        do_modprobe nfsd
26
 
 
27
 
        do_modprobe sunrpc
28
 
 
29
 
        if ! mountpoint -q "$PIPEFS_MOUNTPOINT"
30
 
        then
31
 
                mkdir -p "$PIPEFS_MOUNTPOINT"
32
 
                mount -t rpc_pipefs rpc_pipefs "$PIPEFS_MOUNTPOINT" || true
33
 
        fi
34
 
end script
35
 
 
36
 
exec rpc.idmapd
37
 
 
38
 
post-stop script
39
 
        if mountpoint -q "$PIPEFS_MOUNTPOINT"
40
 
        then
41
 
                # ignore any failures caused by the filesystem still
42
 
                # being in use
43
 
                umount "$PIPEFS_MOUNTPOINT" || true
44
 
        fi
45
 
end script
46