#! /bin/sh # preinst script for lm-sensors # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `install' # * `install' # * `upgrade' # * `abort-upgrade' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in install|upgrade) # Remove a config file that was installed in the wrong place # by old versions. if [ -f "/etc/blacklist.d/lm-sensors" ] ; then rm -f /etc/blacklist.d/lm-sensors rmdir --ignore-fail-on-non-empty /etc/blacklist.d/ fi # Remove a config file that is not needed any more if [ -f "/etc/modutils/i2c" ] ; then rm -f /etc/modutils/i2c rmdir --ignore-fail-on-non-empty /etc/modutils/ fi # Remove an old init script if [ -h "/etc/rcS.d/S36lm-sensors" ] ; then rm /etc/rcS.d/S36lm-sensors fi ;; abort-upgrade) ;; *) echo "preinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. exit 0