]> andersk Git - moira.git/blame - gen/longjobs.sh
Command line printer manipulation client, and build goo.
[moira.git] / gen / longjobs.sh
CommitLineData
8cb26d35 1#!/bin/sh
2
3# $Id$
4
5# Wrapper script to install the groups file output by moira, and update
6# the quota database for current group membership.
7
8spooldir=/var/spool/pbs
9spool_etcdir=$spooldir/etc
10exec_prefix=/usr/pbs
11sbindir=${exec_prefix}/sbin
12update_group=${sbindir}/update_group
13groups=${spool_etcdir}/groups
14quotadb=${spool_etcdir}/quotadb
15
16if [ -d /var/athena ] && [ -w /var/athena ]; then
17 exec >/var/athena/moira_update.log 2>&1
18else
19 exec >/tmp/moira_update.log 2>&1
20fi
21
22# The following exit codes are defined and MUST BE CONSISTENT with the
23# error codes the library uses:
24MR_MISSINGFILE=47836473
25MR_MKCRED=47836474
26
27test -r ${groups}.out || exit $MR_MISSINGFILE
28
29if [ -s ${groups}.out ]; then
30 mv ${groups}.out $groups
31 ${update_group} -d $quotadb -a
32 if [ $? != 0 ]; then
33 exit $MR_MKCRED
34 fi
35fi
36
37# cleanup
38test -f $0 && rm -f $0
39
40exit 0
This page took 0.051658 seconds and 5 git commands to generate.