# arg 1:  the new package version
post_install() {
	if [ -r /etc/sane.d/dll.conf ]; then
		[ `grep hpaio < /etc/sane.d/dll.conf|wc -l` == 0 ] && \
		echo hpaio >> /etc/sane.d/dll.conf 2> /dev/null
	fi
}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
	post_install $1
}

# arg 1:  the old package version
pre_remove() {
	if [ -r /etc/sane.d/dll.conf ]; then
		sed -i 's|hpaio||g' /etc/sane.d/dll.conf 2> /dev/null
	fi
}

op=$1
shift

$op $*

# vim: ft=sh
