summaryrefslogtreecommitdiff
path: root/print/LPRng-core/DEINSTALL
diff options
context:
space:
mode:
Diffstat (limited to 'print/LPRng-core/DEINSTALL')
-rw-r--r--print/LPRng-core/DEINSTALL25
1 files changed, 21 insertions, 4 deletions
diff --git a/print/LPRng-core/DEINSTALL b/print/LPRng-core/DEINSTALL
index c70ddb7a6a7..5030363f46c 100644
--- a/print/LPRng-core/DEINSTALL
+++ b/print/LPRng-core/DEINSTALL
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: DEINSTALL,v 1.2 2003/08/30 20:23:01 jlam Exp $
+# $NetBSD: DEINSTALL,v 1.3 2004/09/06 10:44:44 martti Exp $
PKGNAME=$1
STAGE=$2
@@ -10,7 +10,7 @@ CMP="@CMP@"
RM="@RM@"
SAMPLECONFDIR=${PKG_PREFIX}/share/examples/LPRng
-CONFDIR=/etc
+CONFDIR="@PKG_SYSCONFDIR@"
CONFFILES="lpd.conf lpd.perms"
NONCONFFILES="printcap"
@@ -19,7 +19,16 @@ DEINSTALL)
# Remove configuration files if they don't differ from the default
# config file.
#
- for file in ${CONFFILES} ${NONCONFFILES}
+ for file in ${CONFFILES}
+ do
+ FILE=${CONFDIR}/lpd/${file}
+ SAMPLEFILE=${SAMPLECONFDIR}/${file}.example
+ if ${CMP} -s ${FILE} ${SAMPLEFILE}
+ then
+ ${RM} -f ${FILE}
+ fi
+ done
+ for file in ${NONCONFFILES}
do
FILE=${CONFDIR}/${file}
SAMPLEFILE=${SAMPLECONFDIR}/${file}.example
@@ -32,7 +41,15 @@ DEINSTALL)
POST-DEINSTALL)
modified_files=''
- for file in ${CONFFILES} ${NONCONFFILES}
+ for file in ${CONFFILES}
+ do
+ FILE=${CONFDIR}/lpd/${file}
+ if [ -f ${FILE} ]
+ then
+ modified_files="${modified_files} ${FILE}"
+ fi
+ done
+ for file in ${NONCONFFILES}
do
FILE=${CONFDIR}/${file}
if [ -f ${FILE} ]