1*9e2871ecSrm#!/sbin/sh
2*9e2871ecSrm#
3*9e2871ecSrm# CDDL HEADER START
4*9e2871ecSrm#
5*9e2871ecSrm# The contents of this file are subject to the terms of the
6*9e2871ecSrm# Common Development and Distribution License (the "License").
7*9e2871ecSrm# You may not use this file except in compliance with the License.
8*9e2871ecSrm#
9*9e2871ecSrm# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*9e2871ecSrm# or http://www.opensolaris.org/os/licensing.
11*9e2871ecSrm# See the License for the specific language governing permissions
12*9e2871ecSrm# and limitations under the License.
13*9e2871ecSrm#
14*9e2871ecSrm# When distributing Covered Code, include this CDDL HEADER in each
15*9e2871ecSrm# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*9e2871ecSrm# If applicable, add the following below this CDDL HEADER, with the
17*9e2871ecSrm# fields enclosed by brackets "[]" replaced with your own identifying
18*9e2871ecSrm# information: Portions Copyright [yyyy] [name of copyright owner]
19*9e2871ecSrm#
20*9e2871ecSrm# CDDL HEADER END
21*9e2871ecSrm#
22*9e2871ecSrm#
23*9e2871ecSrm# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24*9e2871ecSrm# Use is subject to license terms.
25*9e2871ecSrm#
26*9e2871ecSrm#ident	"%Z%%M%	%I%	%E% SMI"
27*9e2871ecSrm
28*9e2871ecSrm#
29*9e2871ecSrm# Start/Stop client LDAP service
30*9e2871ecSrm#
31*9e2871ecSrm
32*9e2871ecSrm. /lib/svc/share/smf_include.sh
33*9e2871ecSrm
34*9e2871ecSrmcase "$1" in
35*9e2871ecSrm'start')
36*9e2871ecSrm	if [ ! -r /var/ldap/ldap_client_file ]; then
37*9e2871ecSrm		echo "WARNING: /var/ldap/ldap_client_file is missing or not readable" >& 2
38*9e2871ecSrm		exit $SMF_EXIT_ERR_CONFIG
39*9e2871ecSrm	fi
40*9e2871ecSrm
41*9e2871ecSrm	exec /usr/lib/ldap/ldap_cachemgr
42*9e2871ecSrm	;;
43*9e2871ecSrm
44*9e2871ecSrm'stop')
45*9e2871ecSrm	exec /usr/lib/ldap/ldap_cachemgr -K
46*9e2871ecSrm	;;
47*9e2871ecSrm
48*9e2871ecSrm*)
49*9e2871ecSrm	echo "Usage: $0 { start | stop }"
50*9e2871ecSrm	exit 1
51*9e2871ecSrm	;;
52*9e2871ecSrmesac
53