#! /bin/sh
set -e

. /usr/share/debconf/confmodule

if db_get passwd/root-login && [ "$RET" = false ] && \
   db_get tasksel/desktop && [ "$RET" = kde ]; then
	echo "kdesudo kdesudo/kdesu boolean true" | \
		LANG=C chroot /target debconf-set-selections
fi
