summaryrefslogtreecommitdiff
path: root/security/sudo/pkg/DEINSTALL
diff options
context:
space:
mode:
Diffstat (limited to 'security/sudo/pkg/DEINSTALL')
-rw-r--r--security/sudo/pkg/DEINSTALL16
1 files changed, 11 insertions, 5 deletions
diff --git a/security/sudo/pkg/DEINSTALL b/security/sudo/pkg/DEINSTALL
index 92722a32e51..c2986909560 100644
--- a/security/sudo/pkg/DEINSTALL
+++ b/security/sudo/pkg/DEINSTALL
@@ -1,10 +1,14 @@
#!/bin/sh
#
-# $NetBSD: DEINSTALL,v 1.1 2000/12/06 06:33:40 jlam Exp $
+# $NetBSD: DEINSTALL,v 1.2 2001/07/13 07:09:23 jlam Exp $
PKGNAME=$1
STAGE=$2
+CAT="@CAT@"
+CMP="@CMP@"
+RM="@RM@"
+
SAMPLECONFDIR=${PKG_PREFIX}/share/examples/sudo
CONFDIR=/etc
CONFFILES="sudoers"
@@ -18,12 +22,13 @@ DEINSTALL)
do
FILE=${CONFDIR}/${file}
SAMPLEFILE=${SAMPLECONFDIR}/${file}
- if diff -q ${FILE} ${SAMPLEFILE} >/dev/null
+ if ${CMP} -s ${FILE} ${SAMPLEFILE}
then
- rm -f ${FILE}
+ ${RM} -f ${FILE}
fi
done
;;
+
POST-DEINSTALL)
modified_files=''
for file in ${CONFFILES}
@@ -36,7 +41,7 @@ POST-DEINSTALL)
done
if [ -n "${modified_files}" ]
then
- cat << EOF
+ ${CAT} << EOF
===========================================================================
If you won't be using ${PKGNAME} any longer, you may want to remove the
following files:
@@ -46,11 +51,12 @@ EOF
do
echo " ${file}"
done
- cat << EOF
+ ${CAT} << EOF
===========================================================================
EOF
fi
;;
+
*)
echo "Unexpected argument: ${STAGE}"
exit 1