diff options
author | jlam <jlam> | 2000-07-22 08:21:59 +0000 |
---|---|---|
committer | jlam <jlam> | 2000-07-22 08:21:59 +0000 |
commit | 9bea997e45a4c375411d7682d93b956e1ac171c1 (patch) | |
tree | 9acc8356f93e5d33fca46802d382f0297452147d /security/openssh/files | |
parent | e9a82c97559fbb28826355c01b087a22463b0c0d (diff) | |
download | pkgsrc-9bea997e45a4c375411d7682d93b956e1ac171c1.tar.gz |
Update openssh to 2.1.1p4.
Package changes:
* Factor out common post-install code from PLIST and package Makefile
into files/INSTALL.
* Enhance files/sshd.sh to handle start/stop/restart/status.
* Check for usable installed version of OpenSSL. This bit possibly
closes the following PRs: 10404, 10501, 10593
Changes from 2.1.1p3:
* allow multiple whitespace but only one '=' between tokens
* close can fail on AFS
* allow leading whitespace in configuration files
* Always create ~/.ssh with mode 700
Diffstat (limited to 'security/openssh/files')
-rw-r--r-- | security/openssh/files/md5 | 4 | ||||
-rw-r--r-- | security/openssh/files/patch-sum | 7 | ||||
-rw-r--r-- | security/openssh/files/sshd.sh | 54 |
3 files changed, 49 insertions, 16 deletions
diff --git a/security/openssh/files/md5 b/security/openssh/files/md5 index 69d6c96f421..6999e123b9c 100644 --- a/security/openssh/files/md5 +++ b/security/openssh/files/md5 @@ -1,3 +1,3 @@ -$NetBSD: md5,v 1.7 2000/07/15 03:53:46 itojun Exp $ +$NetBSD: md5,v 1.8 2000/07/22 08:22:02 jlam Exp $ -MD5 (openssh-2.1.1p3.tar.gz) = a5febdb5d74fdc678bd3c4864f4cf825 +MD5 (openssh-2.1.1p4.tar.gz) = 9525a5a130470290b4adba1f58a7ca8b diff --git a/security/openssh/files/patch-sum b/security/openssh/files/patch-sum index 976e4519e9a..97de850956c 100644 --- a/security/openssh/files/patch-sum +++ b/security/openssh/files/patch-sum @@ -1,7 +1,6 @@ -$NetBSD: patch-sum,v 1.14 2000/07/15 03:53:46 itojun Exp $ +$NetBSD: patch-sum,v 1.15 2000/07/22 08:22:02 jlam Exp $ -MD5 (patch-ae) = 0076ca9d2343f21a304a3eee1a82c3cc -MD5 (patch-ag) = 037888228d97283b54d1232daf3945a2 -MD5 (patch-ah) = 0c144a44edc914f64ebf5bb5fb0ff401 +MD5 (patch-ae) = 62afcf06805bd3ae1337e4f9cf15fd93 +MD5 (patch-ah) = a3e7f9f636cf562a9312b45928ffe62d MD5 (patch-aj) = 5397d9fbfe54544fd186831cfe979329 MD5 (patch-an) = eccf8c19bcee913de49eb2b38999e609 diff --git a/security/openssh/files/sshd.sh b/security/openssh/files/sshd.sh index 6060959692c..8d23e616475 100644 --- a/security/openssh/files/sshd.sh +++ b/security/openssh/files/sshd.sh @@ -1,14 +1,48 @@ #!/bin/sh # -# $NetBSD: sshd.sh,v 1.1 2000/01/27 17:37:19 hubertf Exp $ +# $NetBSD: sshd.sh,v 1.2 2000/07/22 08:22:02 jlam Exp $ # -if [ ! -f @SSH_CONF_DIR@/ssh_host_key ] -then - @PREFIX@/bin/ssh-keygen -f @SSH_CONF_DIR@/ssh_host_key -N '' -fi -if [ -x @PREFIX@/sbin/sshd -a -f @SSH_CONF_DIR@/sshd_config ] -then - @PREFIX@/sbin/sshd - echo -n ' sshd' -fi + +name="sshd" +pidfile="/var/run/${name}.pid" + +case $1 in +start) + if [ ! -f @SSH_CONF_DIR@/ssh_host_key ] + then + @PREFIX@/bin/ssh-keygen -b 1024 -N "" -f /etc/ssh_host_key + fi + if [ ! -f @SSH_CONF_DIR@/ssh_host_dsa_key ] + then + /usr/pkg/bin/ssh-keygen -d -N "" -f /etc/ssh_host_dsa_key + fi + if [ -x @PREFIX@/sbin/sshd -a -f @SSH_CONF_DIR@/sshd_config ] + then + echo "Starting ${name}." + @PREFIX@/sbin/sshd + fi + ;; +stop) + if [ -f ${pidfile} ]; then + pid=`head -1 ${pidfile}` + echo "Stopping ${name}." + kill -TERM ${pid} + else + echo "${name} not running?" + fi + ;; +restart) + ( $0 stop ) + sleep 1 + $0 start + ;; +status) + if [ -f ${pidfile} ]; then + pid=`head -1 ${pidfile}` + echo "${name} is running as pid ${pid}." + else + echo "${name} is not running." + fi + ;; +esac exit 0 |