| # 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. |
| |
| # gssd - rpcsec_gss daemon |
| |
| # The rpcsec_gss protocol gives a means of using the GSS-API generic security |
| # API to provide security for protocols using RPC (in particular, NFS). |
| |
| # This is modified from Ubuntu's gssd.conf |
| |
| description "rpcsec_gss daemon" |
| author "chromium-os-dev@chromium.org" |
| |
| start on (started rpcbind |
| or mounting TYPE=nfs4 OPTIONS=*sec*krb5*) |
| stop on (stopping portmap or runlevel [06]) |
| |
| expect fork |
| respawn |
| |
| pre-start script |
| do_modprobe() { |
| modprobe -q "$1" || true |
| } |
| |
| . /etc/init/lib/nfs-check-setup |
| |
| [ "$NEED_GSSD" = "yes" ] || { stop; exit 0; } |
| |
| # we need this available; better to fail now than |
| # mysteriously on the first mount |
| if ! grep -q -E '^nfs[ ]' /etc/services; then |
| logger "gssd.conf: broken /etc/services, cannot find nfs" |
| exit 1 |
| fi |
| |
| do_modprobe nfs |
| do_modprobe nfsd |
| do_modprobe rpcsec_gss_krb5 |
| |
| end script |
| |
| #FIXME(sjg): Should use $OPTS_RPC_GSSD here |
| exec rpc.gssd |