#!/bin/sh
# Copyright (C) 2002-2005 Flavio Stanchina
# Copyright (C) 2005-2006 Aric Cyr
# Copyright (C) 2007 Mario Limonciello
# Copyright (C) 2009 Alberto Milone

set -e

case "$1" in
	configure)
		# If there's not lightdm conf file, then we're in trouble
		# add a new one
		if [ ! -f /etc/lightdm/lightdm.conf ]; then
		    cp -f /usr/share/cedarview-drm/lightdm.conf /etc/lightdm/lightdm.conf
		fi

		# Update initramfs so that the blacklist ends up in the initramfs
		update-initramfs -u

		update-grub-gfxpayload
	;;

	abort-upgrade|abort-remove|abort-deconfigure)
	;;

	*)
		echo "postinst called with unknown argument \`$1'" >&2
		exit 1
	;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0
