9e2871ec787069e5a50ceec41f190366f4c89c8erm#!/sbin/sh
9e2871ec787069e5a50ceec41f190366f4c89c8erm#
9e2871ec787069e5a50ceec41f190366f4c89c8erm# CDDL HEADER START
9e2871ec787069e5a50ceec41f190366f4c89c8erm#
9e2871ec787069e5a50ceec41f190366f4c89c8erm# The contents of this file are subject to the terms of the
9e2871ec787069e5a50ceec41f190366f4c89c8erm# Common Development and Distribution License (the "License").
9e2871ec787069e5a50ceec41f190366f4c89c8erm# You may not use this file except in compliance with the License.
9e2871ec787069e5a50ceec41f190366f4c89c8erm#
9e2871ec787069e5a50ceec41f190366f4c89c8erm# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9e2871ec787069e5a50ceec41f190366f4c89c8erm# or http://www.opensolaris.org/os/licensing.
9e2871ec787069e5a50ceec41f190366f4c89c8erm# See the License for the specific language governing permissions
9e2871ec787069e5a50ceec41f190366f4c89c8erm# and limitations under the License.
9e2871ec787069e5a50ceec41f190366f4c89c8erm#
9e2871ec787069e5a50ceec41f190366f4c89c8erm# When distributing Covered Code, include this CDDL HEADER in each
9e2871ec787069e5a50ceec41f190366f4c89c8erm# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9e2871ec787069e5a50ceec41f190366f4c89c8erm# If applicable, add the following below this CDDL HEADER, with the
9e2871ec787069e5a50ceec41f190366f4c89c8erm# fields enclosed by brackets "[]" replaced with your own identifying
9e2871ec787069e5a50ceec41f190366f4c89c8erm# information: Portions Copyright [yyyy] [name of copyright owner]
9e2871ec787069e5a50ceec41f190366f4c89c8erm#
9e2871ec787069e5a50ceec41f190366f4c89c8erm# CDDL HEADER END
9e2871ec787069e5a50ceec41f190366f4c89c8erm#
9e2871ec787069e5a50ceec41f190366f4c89c8erm#
9e2871ec787069e5a50ceec41f190366f4c89c8erm# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
9e2871ec787069e5a50ceec41f190366f4c89c8erm# Use is subject to license terms.
9e2871ec787069e5a50ceec41f190366f4c89c8erm#
9e2871ec787069e5a50ceec41f190366f4c89c8erm#ident "%Z%%M% %I% %E% SMI"
9e2871ec787069e5a50ceec41f190366f4c89c8erm
9e2871ec787069e5a50ceec41f190366f4c89c8erm#
9e2871ec787069e5a50ceec41f190366f4c89c8erm# Start/Stop client LDAP service
9e2871ec787069e5a50ceec41f190366f4c89c8erm#
9e2871ec787069e5a50ceec41f190366f4c89c8erm
9e2871ec787069e5a50ceec41f190366f4c89c8erm. /lib/svc/share/smf_include.sh
9e2871ec787069e5a50ceec41f190366f4c89c8erm
9e2871ec787069e5a50ceec41f190366f4c89c8ermcase "$1" in
9e2871ec787069e5a50ceec41f190366f4c89c8erm'start')
9e2871ec787069e5a50ceec41f190366f4c89c8erm if [ ! -r /var/ldap/ldap_client_file ]; then
9e2871ec787069e5a50ceec41f190366f4c89c8erm echo "WARNING: /var/ldap/ldap_client_file is missing or not readable" >& 2
9e2871ec787069e5a50ceec41f190366f4c89c8erm exit $SMF_EXIT_ERR_CONFIG
9e2871ec787069e5a50ceec41f190366f4c89c8erm fi
9e2871ec787069e5a50ceec41f190366f4c89c8erm
9e2871ec787069e5a50ceec41f190366f4c89c8erm exec /usr/lib/ldap/ldap_cachemgr
9e2871ec787069e5a50ceec41f190366f4c89c8erm ;;
9e2871ec787069e5a50ceec41f190366f4c89c8erm
9e2871ec787069e5a50ceec41f190366f4c89c8erm'stop')
9e2871ec787069e5a50ceec41f190366f4c89c8erm exec /usr/lib/ldap/ldap_cachemgr -K
9e2871ec787069e5a50ceec41f190366f4c89c8erm ;;
9e2871ec787069e5a50ceec41f190366f4c89c8erm
9e2871ec787069e5a50ceec41f190366f4c89c8erm*)
9e2871ec787069e5a50ceec41f190366f4c89c8erm echo "Usage: $0 { start | stop }"
9e2871ec787069e5a50ceec41f190366f4c89c8erm exit 1
9e2871ec787069e5a50ceec41f190366f4c89c8erm ;;
9e2871ec787069e5a50ceec41f190366f4c89c8ermesac