# Package lists are ignored for thin clients, so this file ensures that some
# necessary programs are included.
case "$MODE" in
    after-install)
        test -z "$FAT_CLIENT_DESKTOPS" || return 0

        # Consolidate spaces
        THIN_CLIENT_PACKAGES=$(echo $THIN_CLIENT_PACKAGES)

        test -n "$THIN_CLIENT_PACKAGES" || return 0

        error() {
            echo "$@" >&2
            echo "$@" >> /var/log/sch-scripts.log
        }

        if ! chroot $ROOT apt-get $APT_GET_OPTS install $THIN_CLIENT_PACKAGES; then
                error "ERROR while installing the following thin client packages:
    $THIN_CLIENT_PACKAGES
Please install them manually after the chroot is built."
        fi
    ;;
esac
