#!/bin/bash

## Copyright (C) 2025 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
## See the file COPYING for copying conditions.

## Keep the command trace: it is this script's diagnostic output.
set -x
set -o errexit
set -o nounset
set -o pipefail
set -o errtrace
shopt -s inherit_errexit
shopt -s shift_verbose

## This script creates the autologin configuration files for account 'user'.
## This is done in a chroot post-install script rather than simply shipping
## the autologin configuration in a package, because the user may enable or
## disable autologin manually and we don't want the user's changes and
## Kicksecure packages to conflict.

## Enable autologin by default for account `user`.
/usr/sbin/autologinchange -e user
