Changeset 21


Ignore:
Timestamp:
11/07/07 13:43:44 (16 years ago)
Author:
adi
Message:

check spooldir permissions on startup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/init.d

    r8 r21  
    1414TORQUE_DIR=/usr/sbin
    1515DEFAULT=/etc/default/torque
     16SPOOLDIR=/var/spool/torque
    1617
    1718# Some useful defaults can be overriden in the DEFAULT file
     
    4546
    4647start_daemons() {
     48    check_perms
     49
    4750        if [ "$PBS_SERVER" = "1" ]
    4851        then
     
    98101
    99102
     103## Check permissions and directories
     104check_perms() {
     105
     106    check_dir() {
     107        if [ ! -d "$1" ]; then
     108            mkdir -m 1777 "$1"
     109        else
     110            chmod 1777 "$1"
     111        fi
     112    }
     113
     114    check_dir $SPOOLDIR/spool
     115    check_dir $SPOOLDIR/undelivered
     116}
     117
     118
    100119## Main
    101120case "$1" in
Note: See TracChangeset for help on using the changeset viewer.