#!/bin/sh # postinst script for debian-edu-fai # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see https://www.debian.org/doc/debian-policy/ or # the debian-policy package case "${1}" in 'configure') ### ### setup fai user account (needed for DLW keytab distribution) ### if ! getent 'passwd' 'fai' >'/dev/null'; then echo 'Creating fai system user.' >&2 adduser --system --group \ --home /var/log/fai/client-logs \ --disabled-password --shell /bin/bash fai fi ## ## fix permissions on upgrade ## chmod 640 /etc/debian-edu/debian-edu-fai.conf ;; 'abort-upgrade'|'abort-remove'|'abort-deconfigure') ;; *) echo "postinst called with unknown argument '${1}'" >&2 exit '1' ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. # Automatically added by dh_installdeb/13.13 dpkg-maintscript-helper mv_conffile /etc/debian-edu/faiinstall.conf /etc/debian-edu/debian-edu-fai.conf 2022.02.22.1\~ -- "$@" # End automatically added section exit '0'