#! /bin/ksh

# source in std. library functions:
[ -f /ibin/ccsSetup.sh ] && . /ibin/ccsSetup.sh

#
# If we had an existing cupsd.conf then move it aside
#

CPD=/etc/cups/cupsd.conf
SAM=

if [ -f $CPD ]
then
  [ -e $CPD.default ] && diff $CPD.default $CPD > $CPD.dif && SAM=1
  if [ "$SAM" ]
  then
    rm -f $CPD.dif $CPD
  else
    [ -f $CPD.bak ] && mv $CPD.bak $CPD.bak$$
    mv $CPD $CPD.bak
  fi
fi

# Stop any running Cups
[ -x /etc/init.d/cups ] && /etc/init.d/cups stop 2>&1 > /dev/null

exit $OK
