summaryrefslogtreecommitdiff
path: root/security/openssh
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2000-07-22 08:22:59 +0000
committerjlam <jlam@pkgsrc.org>2000-07-22 08:22:59 +0000
commitd6efec4c74e800d5899f46ab4b64dd1a83cc3c91 (patch)
tree7b79328fd61b78518e7c3cd0aa1b11eb18dbf601 /security/openssh
parent1693b89d3fb9f4289a2cd2bdc134c1fa0dddf0ec (diff)
downloadpkgsrc-d6efec4c74e800d5899f46ab4b64dd1a83cc3c91.tar.gz
INSTALL file containing post-install code factored from package Makefile
and PLIST.
Diffstat (limited to 'security/openssh')
-rw-r--r--security/openssh/pkg/INSTALL48
1 files changed, 48 insertions, 0 deletions
diff --git a/security/openssh/pkg/INSTALL b/security/openssh/pkg/INSTALL
new file mode 100644
index 00000000000..8517160ab65
--- /dev/null
+++ b/security/openssh/pkg/INSTALL
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# $NetBSD: INSTALL,v 1.1 2000/07/22 08:22:59 jlam Exp $
+
+PKGNAME=$1
+STAGE=$2
+
+case ${STAGE} in
+PRE-INSTALL)
+ ;;
+POST-INSTALL)
+ SSH_CONF_DIR=@SSH_CONF_DIR@
+ SSH_EXAMPLE_DIR=${PKG_PREFIX}/share/examples/ssh
+ INSTALL_DATA="/usr/bin/install -c -o root -g wheel -m 0644"
+
+ if [ ! -d ${SSH_CONF_DIR} ]
+ then
+ echo "Creating directory ${SSH_CONF_DIR} for ssh config files.."
+ mkdir -p ${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 RSA secret host key in ${SSH_CONF_DIR}.."
+ ${PKG_PREFIX}/bin/ssh-keygen -b 1024 -N "" \
+ -f ${SSH_CONF_DIR}/ssh_host_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 -d -N "" \
+ -f ${SSH_CONF_DIR}/ssh_host_dsa_key
+ fi
+ ;;
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
+ ;;
+esac
+exit 0