#!/bin/sh

set -e

if ! getent group isar >/dev/null; then
	addgroup --quiet --system isar
fi

if ! getent passwd isar >/dev/null; then
	useradd --system --gid isar --create-home \
		--home /var/lib/isar --no-user-group \
		--comment "My isar user" \
		isar
fi

# since the homedir was part of the package, useradd did not include skel
cp -RTn /etc/skel ~isar

chown -R isar:isar ~isar

echo "ekylin" > /etc/hostname

# this helps with ttys not know to this file (removed upstream with bullseye)
rm -f /etc/securetty
