#
# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
#
KEYGEN="/usr/bin/ssh-keygen -q"
# Checks to see if RSA, and DSA host keys are available
# if any of these keys are not present, the respective keys are created.
{
keypath=$1
keytype=$2
if [ ! -f $keypath ]; then
#
# HostKey keywords in sshd_config may be preceded or
# followed by a mix of any number of space or tabs,
# and optionally have an = between keyword and
# argument. We use two grep invocations such that we
# can match HostKey case insensitively but still have
# the case of the path name be significant, keeping
# the pattern somewhat more readable.
#
# The character classes below contain one literal
# space and one literal tab.
#
if [ $? -eq 0 ]; then
if [ $? -ne 0 ]; then
exit $SMF_EXIT_ERR_CONFIG
fi
fi
fi
}
{
FMRI=$1
policy=`get_policy ${FMRI}`
#
# Get port from /etc/ssh/sshd_config
#
done
}
# This script is being used for two purposes: as part of an SMF
# application.
#
# Both, the SMF methods and sysidconfig/sys-unconfig use different
# arguments..
case $1 in
# sysidconfig/sys-unconfig arguments (-c and -u)
'-c')
if [ $? -ne 0 ]; then
fi
;;
'-u')
# sys-unconfig(1M) knows how to remove ssh host keys, so there's
# nothing to do here.
:
;;
# SMF arguments (start and restart [really "refresh"])
'ipfilter')
;;
'start')
#
# If host keys don't exist when the service is started, create
# them; sysidconfig is not run in every situation (such as on
# the install media).
#
if [ $? -ne 0 ]; then
fi
;;
'restart')
if [ -f "$PIDFILE" ]; then
fi
;;
*)
echo "Usage: $0 { start | restart }"
exit 1
;;
esac
exit $?