1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00
freebsd-ports/security/sudo/pkg-install
Pav Lucistnik e5eaf1bdf0 - Remove etc/sudoers on deinstall if user haven't modified it
PR:		ports/69288 (based on)
Approved by:	maintainer timeout (mharo; year and a half)
2005-12-17 22:12:41 +00:00

11 lines
281 B
Bash

#!/bin/sh
if [ $2 != "POST-INSTALL" ]; then
exit 0
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.default ${PKG_PREFIX}/etc/sudoers
chmod 440 ${PKG_PREFIX}/etc/sudoers
fi