home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 March B
/
SCO_CASTOR4RRT.iso
/
jale
/
install
/
preremove
< prev
Wrap
Text File
|
1998-08-19
|
1KB
|
54 lines
#ident "@(#)preremove 1.2"
#
# preremove
#
LOCALE=ja
#
# Remove printers from scoadmin printer model file
#
# the Japanese printers may have been installed through a number of means.
# Only if they were installed using JMODEL file do we need to do something
# now.
#
JMODEL=/usr/lib/scoadmin/printer/model.stz.${LOCALE}
[ -f /usr/lib/scoadmin/printer/model.stz ] && {
for F in `grep "^japan" $JMODEL`
do
awk '{
if (match($0, MODEL)) {
while (NF !=0 )
getline
getline
}
print
}' MODEL=$F /usr/lib/scoadmin/printer/model.stz \
> /usr/lib/scoadmin/printer/model.stz.tmp
mv /usr/lib/scoadmin/printer/model.stz.tmp \
/usr/lib/scoadmin/printer/model.stz
done
}
#
# take care of filter.table
#
FDLIST=/etc/inst/locale/${LOCALE}/lp/FDLIST.${LOCALE}
LPFILTER=/usr/sbin/lpfilter
if [ -x ${LPFILTER} -a -r ${FDLIST} ]
then
while read fd
do
filter=`expr "${fd}" : '.*/\([^/]*\)\.fd$'`
${LPFILTER} -f ${filter} -x 2>/dev/null
done < ${FDLIST}
fi
#
# restore postprint filter
#
${LPFILTER} -f postprint -i 2>/dev/null
exit 0