svc-kdc.slave revision 7c478bd95313f5f23a4c958a745db2134aa03244
#!/bin/sh
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
. /lib/svc/share/smf_include.sh
. /lib/svc/share/krb_include.sh
# Start process required for KDC propagation to the slave
if [ -s $KDC_CONF_DIR/kdc.conf ]; then
#make sure kdc.conf is configured
#note: the following regex has spaces and a tab
egrep -l '^[ ]*_[_]*default_realm_' \
$KDC_CONF_DIR/kdc.conf > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "Invalid configuration in $KDC_CONF_DIR/kdc.conf file"
exit $SMF_EXIT_ERR_CONFIG
fi
if [ ! -x $BINDIR/kpropd ]; then
echo "$BINDIR/kpropd is not an executable binary"
exit $SMF_EXIT_ERR_CONFIG
fi
if kadm5_acl_configed; then
# Set to an off-line state, this is a master KDC
echo "/etc/krb5/kadm5.acl is configured as a master KDC"
exit $SMF_EXIT_ERR_CONFIG
fi
#
# Both incremental and nonincremental modes can run in daemon, hence
# why we invoke with the -S argument
#
$BINDIR/kpropd -S
exit $SMF_EXIT_OK
else
echo "$KDC_CONF_DIR/kdc.conf does not exist"
exit $SMF_EXIT_ERR_CONFIG
fi