| may92.tar |
Listing 1
1: # 2: # onitesetup.sh: Version 2.0 2/27/92 by Leor Zolman 3: # 4: # Initialize the Overnight Spooler Master Directory and subdirectries 5: # (must be run while logged in as root/super-user) 6: # 7: # Configuration: 8: # set "NPRIORITIES" to the number of desired priority levels 9: # set SPOOLDIR to the master Overnight Spooler directory 10: # 11: # usage: onitesetup.sh 12: # 13: 14: debug=N # Y to create test heirarchy in current dir 15: SPOOLDIR=/usr/spool/onite 16: LOGFILE=$SPOOLDIR/onite.log 17: ADMGROUP=tech # system administrator's group name 18: NPRIORITIES=7 # Number of priority levels, from 1 - NPRIORITIES 19: 20: if [ $debug = Y ]; then 21: JOBDIR=jobs 22: else 23: JOBDIR=$SPOOLDIR/jobs 24: fi 25: 26: # 27: # Create master directory: 28: # 29: 30: if [ $debug = N ]; then 31: echo "Creating master directory $SPOOLDIR..." 32: mkdir $SPOOLDIR >/dev/null 33: chmod 775 $SPOOLDIR 34: chgrp $ADMGROUP $SPOOLDIR 35: fi 36: 37: # 38: # Create other major directories and log file: 39: # 40: 41: [ $debug = N ] && cd $SPOOLDIR 42: echo "Creating subdirectories: jobs stdout jobsdone..." 43: mkdir jobs stdout jobsdone >/dev/null 44: touch $LOGFILE 45: 46: chmod 775 * 47: chgrp $ADMGROUP * 48: 49: # 50: # Create Job directories: 51: # 52: 53: echo "Creating job subdirectories jobs/P1 - jobs/P$NPRIORITIES..." 54: cd jobs 55: priority=1 56: while [ $priority -le $NPRIORITIES ] 57: do 58: mkdir P$priority >/dev/null 59: priority=`expr $priority + 1` 60: done 61: 62: chmod 777 *
|