#!/bin/sh set -e SUDOERSUSR="/usr/share/llxcfg-ldap-common/sudoers/lliurex" SUDOERSETC="/etc/sudoers.d/lliurex" create_file_sudoers() { cp $SUDOERSUSR ${SUDOERSUSR}.tmp chmod 0440 ${SUDOERSUSR}.tmp chown root:root ${SUDOERSUSR}.tmp mv ${SUDOERSUSR}.tmp $SUDOERSETC } case "$1" in configure) llxcfg-pam-admin enable mkhomedir || true pam-auth-update --package --force create_file_sudoers || true PERMISSION=$(stat $SUDOERSETC --printf=%a) if [ "440" != "$PERMISSION" ]; then rm -f $SUDOERSETC fi ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# exit 0