Attached are updated versions courtesy of Bryan Cardillo, for multiple users
per node.  epilogue is copied or linked to epilogue.parallel; same goes for
prologue.

Dan W.
lockfile=/usr/bin/lockfile
rm=/bin/rm
test=/usr/bin/test
echo=/bin/echo
sed=/bin/sed

lock()
{
    file=$1
    $lockfile -r 3 $file.lock
}

unlock()
{
    file=$1
    $rm -f $file.lock
}

allow()
{
    file=$1
    jobid=$2
    user=$3
    $test -s $file || $echo > $file
    $sed -ie "1i # $jobid\n$user" $file
}

deny()
{
    file=$1
    jobid=$2
    $test -f $file &&
        $sed -ie "/^# $jobid/,+1d" $file
}
#!/bin/sh

. /var/spool/PBS/mom_priv/functions

lock /etc/pbs_sshauth && {
        deny /etc/pbs_sshauth $1
        unlock /etc/pbs_sshauth
}

exit 0
#!/bin/sh

. /var/spool/PBS/mom_priv/functions

lock /etc/pbs_sshauth && {
        deny /etc/pbs_sshauth $1
        unlock /etc/pbs_sshauth
}

exit 0
_______________________________________________
Beowulf mailing list, [email protected]
To change your subscription (digest mode or unsubscribe) visit 
http://www.beowulf.org/mailman/listinfo/beowulf

Reply via email to