#! /bin/sh
set -e

case $1 in
	configure)
		if dpkg --compare-versions "$2" lt 012-2; then
			ln -sf ../pcmcia.rules /etc/udev/rules.d/85-pcmcia.rules
		fi
		if [ ! -f /etc/pcmcia/config.opts ]; then
			cp -a /usr/lib/pcmciautils/config.opts /etc/pcmcia/
		fi

		# Remove shutdown and reboot links;
		# this init script does not need them.
		if dpkg --compare-versions "$2" lt 014-2; then
			rm -f /etc/rc0.d/K88pcmciautils \
			      /etc/rc6.d/K88pcmciautils
		fi
		;;
esac

# Automatically added by dh_installinit
if [ -x "/etc/init.d/pcmciautils" ]; then
	update-rc.d pcmciautils start 40 S . >/dev/null || exit $?
fi
# End automatically added section


exit 0
