sshd revision eb1a34638eba7c5add1421327f3eb225a8ea7518
2915eb26d1a16c56cdd91fed07566557d42645bdfielding# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
26a4456dd6f1a5d7d7fff766551461a578687c4and# Use is subject to license terms.
64185f9824e42f21ca7b9ae6c004484215c031a7rbb# Checks to see if RSA, and DSA host keys are available
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# if any of these keys are not present, the respective keys are created.
2915eb26d1a16c56cdd91fed07566557d42645bdfielding if [ ! -f $keypath ]; then
2915eb26d1a16c56cdd91fed07566557d42645bdfielding grep "^HostKey $keypath" $SSHDIR/sshd_config > /dev/null 2>&1
2915eb26d1a16c56cdd91fed07566557d42645bdfielding if [ $? -eq 0 ]; then
2915eb26d1a16c56cdd91fed07566557d42645bdfielding echo Creating new $keytype public/private host key pair
2915eb26d1a16c56cdd91fed07566557d42645bdfielding tports=`grep "^Port" /etc/ssh/sshd_config 2>/dev/null | \
2915eb26d1a16c56cdd91fed07566557d42645bdfielding generate_rules $FMRI $policy "tcp" "any" $port $ipf_file
2915eb26d1a16c56cdd91fed07566557d42645bdfielding# This script is being used for two purposes: as part of an SMF
2915eb26d1a16c56cdd91fed07566557d42645bdfielding# start/stop/refresh method, and as a sysidconfig(1M)/sys-unconfig(1M)
2915eb26d1a16c56cdd91fed07566557d42645bdfielding# application.
64185f9824e42f21ca7b9ae6c004484215c031a7rbb# Both, the SMF methods and sysidconfig/sys-unconfig use different
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# arguments..
6ca0e6973c8176100f4a426444823ae5e777e28fsascha # sysidconfig/sys-unconfig arguments (-c and -u)
if [ -f "$PIDFILE" ]; then