Changeset View
Changeset View
Standalone View
Standalone View
head/mail/dcc-dccd/files/pkg-install.in
#!/bin/sh | #!/bin/sh | ||||
# $FreeBSD: /tmp/pcvs/ports/mail/dcc-dccd/files/pkg-install.in,v 1.2 2011-07-04 19:39:45 crees Exp $ | # $FreeBSD: /tmp/pcvs/ports/mail/dcc-dccd/files/pkg-install.in,v 1.2 2011-07-04 19:39:45 crees Exp $ | ||||
PREFIX=${PKG_PREFIX:-%%PREFIX%%} | PREFIX=${PKG_PREFIX:-%%PREFIX%%} | ||||
DCCHOME=%%DCCHOME%% | DCCHOME=%%DCCHOME%% | ||||
DCCUSER=%%DCCUSER%% | |||||
if [ "$2" = "POST-INSTALL" ]; then | if [ "$2" = "POST-INSTALL" ]; then | ||||
echo "=> Generating unique passwords for your DCC install..." | |||||
echo "=>" | |||||
echo "=> Note this will make map.sample, map.txt.sample and" | |||||
echo "=> ids.sample fail their MD5 checks on package removal." | |||||
/bin/sh $PREFIX/dcc/libexec/fix-map \ | /bin/sh $PREFIX/dcc/libexec/fix-map \ | ||||
-n .sample \ | -n .nopasswd \ | ||||
-I $DCCHOME/ids.sample -i $DCCHOME/ids \ | -I $DCCHOME/ids.nopasswd -i $DCCHOME/ids \ | ||||
-T $DCCHOME/map.txt.sample -t $DCCHOME/map.txt \ | -T $DCCHOME/map.txt.nopasswd -t $DCCHOME/map.txt \ | ||||
-m $DCCHOME/map | -m $DCCHOME/map | ||||
for file in ids map map.txt ; do | for file in ids map map.txt ; do | ||||
/bin/cp -p $DCCHOME/$file $DCCHOME/${file}.sample | /bin/cp -p $DCCHOME/$file $DCCHOME/${file}.nopasswd | ||||
/usr/sbin/chown $DCCUSER $DCCHOME/${file} $DCCHOME/${file}.nopasswd | |||||
done | done | ||||
fi | fi | ||||
exit 0 | exit 0 |