diff --git a/security/sudo/Makefile b/security/sudo/Makefile index cbbd0a769cd7..dbf7738ed6da 100644 --- a/security/sudo/Makefile +++ b/security/sudo/Makefile @@ -7,7 +7,7 @@ PORTNAME= sudo PORTVERSION= 1.6.7.5 -PORTREVISION?= 0 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= http://www.sudo.ws/sudo/dist/ \ http://probsd.org/sudoftp/ \ @@ -55,6 +55,7 @@ post-patch: @${REINPLACE_CMD} -e 's|^|#|g' ${WRKSRC}/sample.sudoers post-install: - ${INSTALL_DATA} ${WRKSRC}/sample.sudoers ${PREFIX}/etc/sudoers.sample + @${MKDIR} ${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/sample.sudoers ${EXAMPLESDIR}/sudoers .include diff --git a/security/sudo/pkg-install b/security/sudo/pkg-install index bd38791d206e..95bd56127f0d 100644 --- a/security/sudo/pkg-install +++ b/security/sudo/pkg-install @@ -5,6 +5,6 @@ fi if [ -e ${PKG_PREFIX}/etc/sudoers ]; then echo "Will not overwrite existing ${PKG_PREFIX}/etc/sudoers file." else - cp -p ${PKG_PREFIX}/etc/sudoers.sample ${PKG_PREFIX}/etc/sudoers + cp -p ${EXAMPLESDIR}/sudoers ${PKG_PREFIX}/etc/sudoers chmod 440 ${PKG_PREFIX}/etc/sudoers fi diff --git a/security/sudo/pkg-plist b/security/sudo/pkg-plist index e4ca595b134b..ab2792bdc9a5 100644 --- a/security/sudo/pkg-plist +++ b/security/sudo/pkg-plist @@ -1,4 +1,5 @@ -@unexec if cmp -s %D/etc/sudoers %D/etc/sudoers.sample; then rm -f %D/etc/sudoers; fi +@unexec if cmp -s %D/etc/sudoers %%EXAMPLESDIR%%/sudoers; then rm -f %D/etc/sudoers; fi bin/sudo -etc/sudoers.sample sbin/visudo +%%EXAMPLESDIR%%/sudoers +@dirrm %%EXAMPLESDIR%%