summaryrefslogtreecommitdiff
path: root/security/openssh
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2002-06-26 04:01:02 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2002-06-26 04:01:02 +0000
commit6b75f866310c3ebf514c8459e55fb2ceeab5e9b2 (patch)
treea1a97c96a9f2ebd44f46db75a3421b89a000ce3f /security/openssh
parent${PERL} -> ${REINPLACE_CMD} (diff)
Small cleanups for smoothlees migration to $PREFIX/etc/shh
Notes
Notes: svn path=/head/; revision=61972
Diffstat (limited to 'security/openssh')
-rw-r--r--security/openssh/Makefile17
-rw-r--r--security/openssh/pkg-plist9
2 files changed, 13 insertions, 13 deletions
diff --git a/security/openssh/Makefile b/security/openssh/Makefile
index ec8912aa0fb4..c15dbab64ba8 100644
--- a/security/openssh/Makefile
+++ b/security/openssh/Makefile
@@ -7,7 +7,7 @@
PORTNAME= openssh
PORTVERSION= 3.3
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= security
MASTER_SITES= ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/ \
ftp://ftp.usa.openbsd.org/pub/OpenBSD/OpenSSH/ \
@@ -68,8 +68,10 @@ MAKE_ENV+= PAM=${PAM}
.if defined(SKEY) && ${SKEY} == YES
MAKE_ENV+= SKEY=yes
.endif
+EMPTYDIR= ${PREFIX}/empty
ETCOLD= ${PREFIX}/etc
ETCSSH= ${PREFIX}/etc/ssh
+PLIST_SUB+= EMPTYDIR=${EMPTYDIR}
WRKSRC= ${WRKDIR}/ssh
post-extract:
@@ -110,17 +112,16 @@ post-configure:
.endif
pre-install:
+ -${MKDIR} ${EMPTYDIR}
if ! pw groupshow sshd; then pw groupadd sshd -g 22; fi
if ! pw usershow sshd; then pw useradd sshd -g sshd -u 22 \
- -h - -d ${PREFIX}/empty -s /nonexistent -c "sshd privilege separation"; fi
+ -h - -d ${EMPTYDIR} -s /nonexistent -c "sshd privilege separation"; fi
${MKDIR} ${PREFIX}/libdata/ssh
- ${MKDIR} ${PREFIX}/empty
- ${MKDIR} ${ETCSSH}
+ -@[ ! -d ${ETCSSH} ] && ${MKDIR} ${ETCSSH}
.for i in ${PRECIOUS}
-.if exists(${PREFIX}/etc/${i})
- @${ECHO_MSG} ">> Linking ${ETCSSH}/${i} from old layout."
- @${LN} ${ETCOLD}/${i} ${ETCSSH}/${i}
-.endif
+ -@[ -f ${ETCOLD}/${i} ] && [ ! -f ${ETCSSH}/${i} ] && \
+ ${ECHO_MSG} ">> Linking ${ETCSSH}/${i} from old layout." && \
+ ${LN} ${ETCOLD}/${i} ${ETCSSH}/${i}
.endfor
post-install:
diff --git a/security/openssh/pkg-plist b/security/openssh/pkg-plist
index 27c1ec78989d..de51fbc5e3ee 100644
--- a/security/openssh/pkg-plist
+++ b/security/openssh/pkg-plist
@@ -1,6 +1,6 @@
+bin/slogin
bin/scp
bin/sftp
-bin/slogin
bin/ssh
bin/ssh-add
bin/ssh-agent
@@ -22,17 +22,16 @@ etc/ssh/ssh_config-dist
etc/ssh/sshd_config-dist
@exec [ ! -f %D/etc/ssh/ssh_config ] && cp %D/etc/ssh/ssh_config-dist %D/etc/ssh/ssh_config
@exec [ ! -f %D/etc/ssh/sshd_config ] && cp %D/etc/ssh/sshd_config-dist %D/etc/ssh/sshd_config
-sbin/sshd
@dirrm etc/ssh
+sbin/sshd
libexec/sftp-server
libexec/ssh-keysign
libdata/ssh/Ssh.bin
@dirrm libdata/ssh
-@exec mkdir -p %D/empty
-@dirrm empty
@exec if [ ! -f %D/etc/ssh/ssh_host_key ]; then echo ">> Generating a secret RSA1 host key."; %D/bin/ssh-keygen -t rsa1 -N "" -f %D/etc/ssh/ssh_host_key; fi
@exec if [ ! -f %D/etc/ssh/ssh_host_rsa_key ]; then echo ">> Generating a secret RSA host key."; %D/bin/ssh-keygen -t rsa -N "" -f %D/etc/ssh/ssh_host_rsa_key; fi
@exec if [ ! -f %D/etc/ssh/ssh_host_dsa_key ]; then echo ">> Generating a secret DSA host key."; %D/bin/ssh-keygen -t dsa -N "" -f %D/etc/ssh/ssh_host_dsa_key; fi
+@exec mkdir -p %D/empty
@dirrm empty
@exec if ! pw groupshow sshd 2>/dev/null; then pw groupadd sshd -g 22; fi
-@exec if ! pw usershow sshd 2>/dev/null; then pw useradd sshd -g sshd -u 22 -h - -d %D/empty -s /nonexistent -c "sshd privilege separation"; fi
+@exec if ! pw usershow sshd 2>/dev/null; then pw useradd sshd -g sshd -u 22 -h - -d %%EMPTYDIR%% -s /nonexistent -c "sshd privilege separation"; fi