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