4
# source debconf library
5
. /usr/share/debconf/confmodule
7
LIGHTDM_DEBCONF_KEY=shared/lightdm-greeter
8
LIGHTDM_CONF=/etc/lightdm/lightdm.conf
10
get_lightdm_greeter() {
11
sed -n -e '/^\[SeatDefault\]/,/^\[/p' $LIGHTDM_CONF \
12
| awk -F= '$1 =="greeter-session" { print $2 }'
16
if db_metaget $LIGHTDM_DEBCONF_KEY owners; then
21
if db_metaget $LIGHTDM_DEBCONF_KEY choices; then
25
if [ "$OWNERS" != "$CHOICES" ]; then
26
db_subst $LIGHTDM_DEBCONF_KEY choices "$OWNERS" || :
27
db_fset $LIGHTDM_DEBCONF_KEY seen false || :
30
# debconf is not a registry; use the current greeter setting to pre-answer the
31
# question if possible
32
if [ -e "$LIGHTDM_CONF" ]; then
33
CURRENT_DEFAULT=$(get_lightdm_greeter)
34
if [ -n "$CURRENT_DEFAULT" ]; then
35
db_set $LIGHTDM_DEBCONF_KEY "$CURRENT_DEFAULT"
39
# when installing from scratch as part of a release upgrade, default to
41
if [ -z "$2" -a -n "$RELEASE_UPGRADE_IN_PROGRESS" ]; then
42
db_set $LIGHTDM_DEBCONF_KEY $THIS_PACKAGE
43
db_fset $LIGHTDM_DEBCONF_KEY seen true
45
db_input high $LIGHTDM_DEBCONF_KEY || :