#!/bin/sh set -e # main action="$1" case $action in pre-cpkg) # read vars VAR_LIST="CODIGO_CENTRO LLIUREX_MA LLIUREX_SLD KRB5_REALM LDAP_SRV_MODE" eval $(llxcfg-showvars ${VAR_LIST}) # always generate KRB5_REALM variable in system level. It doesn't override the variable in admin level. [ "$CODIGO_CENTRO" -a "$LLIUREX_MA" -a "$LLIUREX_SLD" ] || exit 0 # ok, KRB5_REALM may be empty, but we have the ingredients ... llxcfg-systemvars add KRB5_REALM="$(echo "${CODIGO_CENTRO}.${LLIUREX_MA}.${LLIUREX_SLD}"|tr '[:lower:]' '[:upper:]')" KRB5_SRV_MODE="$LDAP_SRV_MODE" ## archive KRB5_REALM # llxcfg-archivevars KERBEROS store KRB5_REALM ;; *) exit 0 ;; esac exit 0