diff options
author | green <green@FreeBSD.org> | 1999-11-20 11:42:05 +0800 |
---|---|---|
committer | green <green@FreeBSD.org> | 1999-11-20 11:42:05 +0800 |
commit | 1ea77a0e2de2644f0a78b74cb906302f1c171037 (patch) | |
tree | b1794eb9a95e808365770cd1ce19240385c301ef /security/openssh | |
parent | 6e16603b1d230f6652c811665aa86c6726f4eb22 (diff) | |
download | freebsd-ports-gnome-1ea77a0e2de2644f0a78b74cb906302f1c171037.tar.gz freebsd-ports-gnome-1ea77a0e2de2644f0a78b74cb906302f1c171037.tar.zst freebsd-ports-gnome-1ea77a0e2de2644f0a78b74cb906302f1c171037.zip |
Change around sshd.sh for the last time.
Diffstat (limited to 'security/openssh')
-rw-r--r-- | security/openssh/Makefile | 15 | ||||
-rw-r--r-- | security/openssh/files/sshd.sh | 7 | ||||
-rw-r--r-- | security/openssh/pkg-plist | 1 |
3 files changed, 7 insertions, 16 deletions
diff --git a/security/openssh/Makefile b/security/openssh/Makefile index 3b05a587cffc..d38dabf13a47 100644 --- a/security/openssh/Makefile +++ b/security/openssh/Makefile @@ -83,7 +83,7 @@ post-patch: 's:^(\s*#\s*include\s+<)ssl(/\w+\.h>\s*)$$:$$1openssl$$2:g' \ ${WRKSRC}/*.[ch] -pre-install: +post-install: @if [ ! -f ${PREFIX}/etc/ssh_config -a \ ! -f ${PREFIX}/etc/sshd_config ]; then \ cd ${WRKSRC} && ${MAKE} DESTDIR=${PREFIX} distribution; \ @@ -92,13 +92,10 @@ pre-install: ${ECHO_MSG} ">> If this is left over from another version of SSH, you will"; \ ${ECHO_MSG} ">> need to update it to work with OpenSSH."; \ fi - @if [ ! -f ${PREFIX}/etc/rc.d/sshd.sh ]; then \ - ${ECHO_MSG} ">> Installing ${PREFIX}/etc/rc.d/sshd.sh startup file."; \ - ${MKDIR} ${PREFIX}/etc/rc.d; \ - ${INSTALL_SCRIPT} ${FILESDIR}/sshd.sh \ - ${PREFIX}/etc/rc.d; \ - ${PERL} -pi -e 's:__PREFIX__:${PREFIX}:g' \ - ${PREFIX}/etc/rc.d/sshd.sh; \ - fi +.if !exists(${PREFIX}/etc/rc.d/sshd.sh) + @${ECHO} "#!/bin/sh" > ${PREFIX}/etc/rc.d/sshd.sh + @${ECHO} "[ -x ${PREFIX}/sbin/sshd ] && exec ${PREFIX}/sbin/sshd" >> ${PREFIX}/etc/rc.d/sshd.sh + @${CHMOD} 0555 ${PREFIX}/etc/rc.d/sshd.sh +.endif .include <bsd.port.mk> diff --git a/security/openssh/files/sshd.sh b/security/openssh/files/sshd.sh deleted file mode 100644 index 78e7ec188619..000000000000 --- a/security/openssh/files/sshd.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Secure Shell daemon startup script -# $FreeBSD$ - -if [ -x __PREFIX__/sbin/sshd ]; then - __PREFIX__/sbin/sshd && echo -n ' sshd' -fi diff --git a/security/openssh/pkg-plist b/security/openssh/pkg-plist index 5f2fb2c24945..4d10a5382c24 100644 --- a/security/openssh/pkg-plist +++ b/security/openssh/pkg-plist @@ -16,3 +16,4 @@ man/man1/ssh.1.gz man/man8/sshd.8.gz sbin/sshd @exec if [ ! -f %D/etc/ssh_host_key ]; then echo ">> Generating a secret host key."; %D/bin/ssh-keygen -N "" -f %D/etc/ssh_host_key; fi +@exec if [ ! -x %D/etc/rc.d/sshd.sh ]; then echo "#!/bin/sh" > %D/etc/rc.d/sshd.sh && exec echo "[ -x %D/sbin/sshd ] && exec %D/sbin/sshd" >> %D/etc/rc.d/sshd.sh && exec chmod 0555 %D/etc/rc.d/sshd.sh; fi |