#!/bin/sh
# ESP Package Manager v4.1
ldconfig
if [ -f /etc/sane.d/dll.conf ]; then
   grep -q ^#hpaio /etc/sane.d/dll.conf
   if [ $? -eq 0 ]; then
      sed -i -e s/^#hpaio/hpaio/ /etc/sane.d/dll.conf
   else
      grep -q ^hpaio /etc/sane.d/dll.conf
      if [ $? -ne 0 ]; then 
	 echo hpaio >>/etc/sane.d/dll.conf
      fi
   fi
fi

# big hammer to overwrite existing configuraton files
if [ ! -d /etc/hp ]; then
   mkdir -p /etc/hp
fi

cp /usr/share/hplip/hplip.conf /etc/hp/
cp /usr/share/hplip/55-hpmud.rules /etc/udev/rules.d

ver=`echo 3.9.4 | sed 's/\([0-9]*.[0-9]*.[0-9]*\).*/\1/'`
touch /usr/share/hplip/data/plugin/hplip-${ver}-plugin.run
