diff options
author | dinoex <dinoex@FreeBSD.org> | 2002-06-26 12:01:02 +0800 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2002-06-26 12:01:02 +0800 |
commit | f29dbdd6d15aa8e8596c920f8b80dc00f3e68a9a (patch) | |
tree | 453feafd9c3cea8a53d17876582da7214a5d2eea /security/openssh | |
parent | 34e89ab8392566d3214ac1b9ecc2dd006abed7b9 (diff) | |
download | freebsd-ports-gnome-f29dbdd6d15aa8e8596c920f8b80dc00f3e68a9a.tar.gz freebsd-ports-gnome-f29dbdd6d15aa8e8596c920f8b80dc00f3e68a9a.tar.zst freebsd-ports-gnome-f29dbdd6d15aa8e8596c920f8b80dc00f3e68a9a.zip |
Small cleanups for smoothlees migration to $PREFIX/etc/shh
Diffstat (limited to 'security/openssh')
-rw-r--r-- | security/openssh/Makefile | 17 | ||||
-rw-r--r-- | security/openssh/pkg-plist | 9 |
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 |