blob: b61c2ed6c13e635dfe96b503ba82803ce0a3c7f3 [file] [log] [blame]
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# idmapd - NFSv4 id <-> name mapper
# rpc.idmapd is the NFSv4 ID <-> name mapping daemon. It provides
# functionality to the NFSv4 kernel client and server, to which it
# communicates via upcalls, by translating user and group IDs to names, and
# vice versa.
# This is modified from Ubuntu's idmapd.conf
description "NFSv4 id <-> name mapper"
author "chromium-os-dev@chromium.org"
start on (local-filesystems or mounting TYPE=nfs4)
stop on runlevel [06]
#console output
expect fork
respawn
env DEFAULTFILE=/etc/conf.d/nfs
env NEED_IDMAPD
pre-start script
do_modprobe() {
modprobe -q "$1" || true
}
. /etc/init/lib/nfs-check-setup
[ "$NEED_IDMAPD" = "yes" ] || { stop idmapd; exit 0; }
do_modprobe nfs
do_modprobe nfsd
end script
script
if [ -f "$DEFAULTFILE" ]; then
. "$DEFAULTFILE"
fi
exec rpc.idmapd $OPTS_RPC_IDMAPD
# If it fails, make sure you have DNOTIFY support in the kernel
# modprobe configs; zgrep DNOTIFY /proc/config.gz
end script