5 # Wrapper script to install the groups file output by moira, and update
6 # the quota database for current group membership.
8 spooldir=/var/spool/pbs
9 spool_etcdir=$spooldir/etc
11 sbindir=${exec_prefix}/sbin
12 update_group=${sbindir}/update_group
13 groups=${spool_etcdir}/groups
14 quotadb=${spool_etcdir}/quotadb
16 if [ -d /var/athena ] && [ -w /var/athena ]; then
17 exec >/var/athena/moira_update.log 2>&1
19 exec >/tmp/moira_update.log 2>&1
22 # The following exit codes are defined and MUST BE CONSISTENT with the
23 # error codes the library uses:
24 MR_MISSINGFILE=47836473
27 test -r ${groups}.out || exit $MR_MISSINGFILE
29 if [ -s ${groups}.out ]; then
30 mv ${groups}.out $groups
31 ${update_group} -d $quotadb -a
38 test -f $0 && rm -f $0