#!/bin/sh -e

if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-remove" ] ; then
    
    #don't do anything if update-rc.d is not present
    if [ -x /usr/sbin/update-rc.d ]; then
    
		#add brightness-init script to restore brightness after reboot 
		if [ -e /etc/init.d/brightness-init ]; then
		update-rc.d brightness-init remove
		rm /etc/init.d/brightness-init
		fi
    
		if [ -e /etc/init.d/efimount ]; then
		update-rc.d efimount defaults
		fi
	fi
fi

#DEBHELPER#
