mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-30 01:15:52 +00:00
[PATCH] security/sudo: Utilize EXAMPLESDIR
Utilize EXAMPLESDIR to improves layout; i.e., configuration file -> ${PREFIX}/etc sample configuration file -> ${PREFIX}/share/examples/${PORTNAME} This change helps if many configuration files and sample ones exist. PR: ports/58387 Submitted by: Hideyuki KURASHINA <rushani@FreeBSD.org>
This commit is contained in:
parent
c75f2c1cfd
commit
708a7296c5
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=114040
@ -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 <bsd.port.post.mk>
|
||||
|
@ -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
|
||||
|
@ -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%%
|
||||
|
Loading…
Reference in New Issue
Block a user