#
# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident	"@(#)postinstall	1.4	04/12/20 SMI"
#

sysidconfig=/usr/sbin/sysidconfig
script=/lib/svc/method/sshd

# Arrange for sysidconfig to do the ssh server hostkey generation
if [ -x "$PKG_INSTALL_ROOT/$script" ]
then
	if $sysidconfig -b "$PKG_INSTALL_ROOT" -l | \
	    grep -s $script > /dev/null 2>&1
	then
		:
	else
		# Add the sysidconfig 'application'
		$sysidconfig -b "$PKG_INSTALL_ROOT" -a $script
	fi
fi

exit 0
