aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorswills <swills@FreeBSD.org>2013-01-09 14:51:24 +0800
committerswills <swills@FreeBSD.org>2013-01-09 14:51:24 +0800
commitaa0e0160d762959c13781f502f338c31519025cf (patch)
tree0a8cab83dacf00fb679166d9427bb88fd4899e4a /net
parenta12970daa27a7805172923efdd3e4cffff5ffe05 (diff)
downloadfreebsd-ports-gnome-aa0e0160d762959c13781f502f338c31519025cf.tar.gz
freebsd-ports-gnome-aa0e0160d762959c13781f502f338c31519025cf.tar.zst
freebsd-ports-gnome-aa0e0160d762959c13781f502f338c31519025cf.zip
- Fix install time RSA key pair generation
PR: ports/174721 Submitted by: Koichiro IWAO <meta+ports@vmeta.jp> (maintainer)
Diffstat (limited to 'net')
-rw-r--r--net/xrdp/Makefile6
-rw-r--r--net/xrdp/pkg-plist3
2 files changed, 5 insertions, 4 deletions
diff --git a/net/xrdp/Makefile b/net/xrdp/Makefile
index 9014b9384542..a8cdf8925860 100644
--- a/net/xrdp/Makefile
+++ b/net/xrdp/Makefile
@@ -3,7 +3,7 @@
PORTNAME= xrdp
PORTVERSION= 0.6.0
-PORTREVISION= 1
+PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES= net
MASTER_SITES= SF/xrdp/xrdp/${PORTVERSION}
@@ -76,8 +76,8 @@ post-install:
${CP} -p ${PREFIX}/etc/xrdp/$f.sample ${PREFIX}/etc/xrdp/$f ; \
fi
.endfor
- @cmp -s ${PREFIX}/etc/xrdp/rsakeys.ini.sample ${PREFIX}/etc/xrdp/rsakeys.ini || \
- ${PREFIX}/bin/xrdp-keygen xrdp ${PREFIX}/etc/xrdp/rsakeys.ini
+ @if cmp -s ${PREFIX}/etc/xrdp/rsakeys.ini.sample ${PREFIX}/etc/xrdp/rsakeys.ini; then \
+ ${PREFIX}/bin/xrdp-keygen xrdp ${PREFIX}/etc/xrdp/rsakeys.ini; fi
@${ECHO_CMD}; ${CAT} ${PKGMESSAGE}; ${ECHO_CMD}
.include <bsd.port.mk>
diff --git a/net/xrdp/pkg-plist b/net/xrdp/pkg-plist
index 913704238cc2..4bcd243c5eeb 100644
--- a/net/xrdp/pkg-plist
+++ b/net/xrdp/pkg-plist
@@ -52,7 +52,8 @@ etc/xrdp/rsakeys.ini.sample
etc/xrdp/sesman.ini.sample
etc/xrdp/startwm.sh.sample
etc/xrdp/xrdp.ini.sample
-@exec cmp -s %D/etc/xrdp/rsakeys.ini.sample %D/etc/xrdp/rsakeys.ini || %D/bin/xrdp-keygen xrdp %D/etc/xrdp/rsakeys.ini
+@comment backup pre-compile-time keypair and generate new one
+@exec if [ -f %D/etc/xrdp/rsakeys.ini ]; then cp -a %D/etc/xrdp/rsakeys.ini %D/etc/xrdp/rsakeys.ini.bak`date +%%Y%%m%%d`; %D/bin/xrdp-keygen xrdp %D/etc/xrdp/rsakeys.ini; fi
@exec [ -f %D/etc/xrdp/sesman.ini ] || cp -p %D/etc/xrdp/sesman.ini.sample %D/etc/xrdp/sesman.ini
@exec [ -f %D/etc/xrdp/startwm.sh ] || cp -p %D/etc/xrdp/startwm.sh.sample %D/etc/xrdp/startwm.sh
@exec [ -f %D/etc/xrdp/xrdp.ini ] || cp -p %D/etc/xrdp/xrdp.ini.sample %D/etc/xrdp/xrdp.ini