1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-29 21:39:24 +00:00
freebsd-ports/security/sudo/pkg-install
Satoshi Asami 9b6acf4966 Put "sudoers.sample" in the package and copy it to "sudoers" if the
latter doesn't already exist.  Closes PR ports/1405 ("why can Satoshi
sudo on my machine?").
1996-07-19 21:00:43 +00:00

10 lines
242 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.sample ${PKG_PREFIX}/etc/sudoers
fi