diff options
author | zuntum <zuntum@pkgsrc.org> | 2001-11-01 00:57:41 +0000 |
---|---|---|
committer | zuntum <zuntum@pkgsrc.org> | 2001-11-01 00:57:41 +0000 |
commit | c72c1cf5f95cbe537b005028f1743cddb16ef203 (patch) | |
tree | 93b6296152ccfbaa88b43de043b2d69ce6e63fc5 /security/openssh/INSTALL | |
parent | 37637e483f1bf6574e9306aebbd013bb63d888d6 (diff) | |
download | pkgsrc-c72c1cf5f95cbe537b005028f1743cddb16ef203.tar.gz |
Move pkg/ files into package's toplevel directory
Diffstat (limited to 'security/openssh/INSTALL')
-rw-r--r-- | security/openssh/INSTALL | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/security/openssh/INSTALL b/security/openssh/INSTALL new file mode 100644 index 00000000000..37199358ebc --- /dev/null +++ b/security/openssh/INSTALL @@ -0,0 +1,68 @@ +#!/bin/sh +# +# $NetBSD: INSTALL,v 1.1 2001/11/01 01:17:04 zuntum Exp $ + +PKGNAME=$1 +STAGE=$2 + +case ${STAGE} in +PRE-INSTALL) + if ! dd if=/dev/urandom of=/dev/null bs=1 count=1 2>/dev/null >/dev/null + then + cat << EOF +=========================================================================== +You need a working /dev/urandom for ${PKGNAME} to work. + +Please make sure you have a kernel compiled from a config file +containing the line: + + pseudo-device rnd +=========================================================================== +EOF + exit 1 + fi + ;; +POST-INSTALL) + SSH_CONF_DIR=@SSH_CONF_DIR@ + SSH_EXAMPLE_DIR=${PKG_PREFIX}/share/examples/openssh + INSTALL_DATA="@INSTALL_DATA@" + + if [ ! -d ${SSH_CONF_DIR} ] + then + echo "Creating directory ${SSH_CONF_DIR} for ssh config files.." + @MKDIR@ ${SSH_CONF_DIR} + fi + for file in ssh_config sshd_config + do + if [ ! -f ${SSH_CONF_DIR}/${file} ] + then + echo "Installing example ${file} in ${SSH_CONF_DIR}.." + ${INSTALL_DATA} ${SSH_EXAMPLE_DIR}/${file} \ + ${SSH_CONF_DIR}/${file} + fi + done + if [ ! -f ${SSH_CONF_DIR}/ssh_host_key ] + then + echo "Generating an RSA1 secret host key in ${SSH_CONF_DIR}.." + ${PKG_PREFIX}/bin/ssh-keygen -t rsa1 -N "" \ + -f ${SSH_CONF_DIR}/ssh_host_key + fi + if [ ! -f ${SSH_CONF_DIR}/ssh_host_rsa_key ] + then + echo "Generating an RSA secret host key in ${SSH_CONF_DIR}.." + ${PKG_PREFIX}/bin/ssh-keygen -t rsa -N "" \ + -f ${SSH_CONF_DIR}/ssh_host_rsa_key + fi + if [ ! -f ${SSH_CONF_DIR}/ssh_host_dsa_key ] + then + echo "Generating a DSA secret host key in ${SSH_CONF_DIR}.." + ${PKG_PREFIX}/bin/ssh-keygen -t dsa -N "" \ + -f ${SSH_CONF_DIR}/ssh_host_dsa_key + fi + ;; +*) + echo "Unexpected argument: ${STAGE}" + exit 1 + ;; +esac +exit 0 |