#!/bin/bash

mkdir -p /ortak-alan
chmod 1777 /ortak-alan

pam-auth-update --enable etap

if [ "$1" = "configure" ] && [ -n "$2" ] && dpkg --compare-versions "$2" le-nl "2026.07.24"; then
    rm -f /etc/modprobe.d/usbcore.conf || true
    update-initramfs -u -k all || true
fi

# Update the dconf database on first installation or when upgrading from older versions.
if [ "$1" = "configure" ] && { [ -z "$2" ] || dpkg --compare-versions "$2" le-nl "2026.04.14"; }; then
    dconf update || true
fi

if [ -d /var/lib/wine-prefix ] ; then
    # remove old wine prefix
    rm -rf /var/lib/wine-prefix
fi
