Changeset 2369


Ignore:
Timestamp:
02/04/07 17:07:47 (12 years ago)
Author:
pjkersha
Message:

ndg.security.*/setup.py: updated to versino 0.7.3 to ensure eggs will be picked on top of an existing installation containing vers. 0.7.2

ndg.security.server/ndg/security/server/share/ndg-aa: (+ other scripts built from makefile) simplified pid file setting - no need to deal with
permission for /var/run dir. twistd enables write of pid file as root.

Location:
TI12-security/trunk/python
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.client/setup.py

    r2283 r2369  
    3030setup( 
    3131    name =                      'ndg_security_client', 
    32     version =                   '0.7.2', 
     32    version =                   '0.7.3', 
    3333    description =               'NERC DataGrid Security Utilities', 
    3434    long_description =          'Software for securing NDG resources', 
  • TI12-security/trunk/python/ndg.security.common/setup.py

    r2289 r2369  
    6868setup( 
    6969    name =                      'ndg_security_common', 
    70     version =                   '0.7.2', 
     70    version =                   '0.7.3', 
    7171    description =                
    7272'''NERC DataGrid Security virtual package containing common utilities used 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/share/ndg-aa

    r2214 r2369  
    3939# write permission on /var/run.  Move file from /tmp to /var/run as root -  
    4040# see below ... 
    41 pidFilePath=/tmp/${serviceName}.pid 
     41pidFilePath=/var/run/${serviceName}.pid 
    4242 
    4343# Command line args e.g. set alternative port number or configuration file 
     
    6363    # See if it's already running. Look *only* at the pid file. 
    6464    local pid= 
    65     if [ -f /var/run/${serviceName}.pid ]; then 
     65    if [ -f ${pidFilePath} ]; then 
    6666        local line p 
    67         read line < /var/run/${serviceName}.pid 
     67        read line < ${pidFilePath} 
    6868        for p in $line ; do 
    6969            [ -z "${p//[0-9]/}" -a -d "/proc/$p" ] && pid="$pid $p" 
     
    7777    ulimit -S -c 0 >/dev/null 2>&1 
    7878 
    79         if [ ! -f ${tacFilePath} ]; then 
    80             failure $"Path to python .tac file not found:" 
    81             return 
    82         fi 
     79    if [ ! -f ${tacFilePath} ]; then 
     80        failure $"Path to python .tac file not found:" 
     81        return 
     82    fi 
    8383 
    8484    # Echo daemon 
     
    9292        # in to give twistd some leaway 
    9393        i=0 
    94         while [ ! -f /tmp/${serviceName}.pid ] && [ "$i" -lt 10 ]; do  
     94        while [ ! -f ${pidFilePath} ] && [ "$i" -lt 10 ]; do  
    9595            sleep 1;  
    9696            let "i++";  
    9797        done 
    9898     
    99         mv /tmp/${serviceName}.pid /var/run/${serviceName}.pid 
    100          
    101         # Put in placeholder so as not to upset twistd when it looks for it 
    102         # on shutdown 
    103         touch /tmp/${serviceName}.pid 
    104         chown ${uid}:${gid} /tmp/${serviceName}.pid 
    105          
    10699        touch /var/lock/subsys/${serviceName}         
    107100        success $"startup" 
     
    120113    # Find pid 
    121114    pid= 
    122     if [ -f /var/run/${serviceName}.pid ]; then 
     115    if [ -f ${pidFilePath} ]; then 
    123116       local line p 
    124        read line < /var/run/${serviceName}.pid 
     117       read line < ${pidFilePath} 
    125118       for p in $line ; do 
    126119           [ -z "${p//[0-9]/}" -a -d "/proc/$p" ] && pid="$pid $p" 
     
    158151 
    159152    # Remove pid and lock files if any. 
    160     rm -f /var/run/${serviceName}.pid 
     153    rm -f ${pidFilePath} 
    161154    rm -f /var/lock/subsys/${serviceName} 
    162155     
     
    175168{ 
    176169    local pid= 
    177     local pidFilePath=/var/run/${serviceName}.pid 
    178170     
    179171    # Get pid from "/var/run/*.pid" file 
     
    199191        echo $"$prog is dead but subsys locked" 
    200192 
    201     elif [ -f /var/run/${serviceName}.pid ]; then 
     193    elif [ -f ${pidFilePath} ]; then 
    202194        echo $"$prog is dead but pid file $pidFilePath exists" 
    203195    else 
     
    221213    ;; 
    222214    condrestart) 
    223     if [ -f /var/run/${serviceName}.pid ] ; then 
     215    if [ -f ${pidFilePath} ] ; then 
    224216        stop 
    225217        start 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/share/ndg-ca

    r2214 r2369  
    3939# write permission on /var/run.  Move file from /tmp to /var/run as root -  
    4040# see below ... 
    41 pidFilePath=/tmp/${serviceName}.pid 
     41pidFilePath=/var/run/${serviceName}.pid 
    4242 
    4343# Command line args e.g. set alternative port number or configuration file 
     
    6363    # See if it's already running. Look *only* at the pid file. 
    6464    local pid= 
    65     if [ -f /var/run/${serviceName}.pid ]; then 
     65    if [ -f ${pidFilePath} ]; then 
    6666        local line p 
    67         read line < /var/run/${serviceName}.pid 
     67        read line < ${pidFilePath} 
    6868        for p in $line ; do 
    6969            [ -z "${p//[0-9]/}" -a -d "/proc/$p" ] && pid="$pid $p" 
     
    7777    ulimit -S -c 0 >/dev/null 2>&1 
    7878 
    79         if [ ! -f ${tacFilePath} ]; then 
    80             failure $"Path to python .tac file not found:" 
    81             return 
    82         fi 
     79    if [ ! -f ${tacFilePath} ]; then 
     80        failure $"Path to python .tac file not found:" 
     81        return 
     82    fi 
    8383 
    8484    # Echo daemon 
     
    9292        # in to give twistd some leaway 
    9393        i=0 
    94         while [ ! -f /tmp/${serviceName}.pid ] && [ "$i" -lt 10 ]; do  
     94        while [ ! -f ${pidFilePath} ] && [ "$i" -lt 10 ]; do  
    9595            sleep 1;  
    9696            let "i++";  
    9797        done 
    9898     
    99         mv /tmp/${serviceName}.pid /var/run/${serviceName}.pid 
    100          
    101         # Put in placeholder so as not to upset twistd when it looks for it 
    102         # on shutdown 
    103         touch /tmp/${serviceName}.pid 
    104         chown ${uid}:${gid} /tmp/${serviceName}.pid 
    105          
    10699        touch /var/lock/subsys/${serviceName}         
    107100        success $"startup" 
     
    120113    # Find pid 
    121114    pid= 
    122     if [ -f /var/run/${serviceName}.pid ]; then 
     115    if [ -f ${pidFilePath} ]; then 
    123116       local line p 
    124        read line < /var/run/${serviceName}.pid 
     117       read line < ${pidFilePath} 
    125118       for p in $line ; do 
    126119           [ -z "${p//[0-9]/}" -a -d "/proc/$p" ] && pid="$pid $p" 
     
    158151 
    159152    # Remove pid and lock files if any. 
    160     rm -f /var/run/${serviceName}.pid 
     153    rm -f ${pidFilePath} 
    161154    rm -f /var/lock/subsys/${serviceName} 
    162155     
     
    175168{ 
    176169    local pid= 
    177     local pidFilePath=/var/run/${serviceName}.pid 
    178170     
    179171    # Get pid from "/var/run/*.pid" file 
     
    199191        echo $"$prog is dead but subsys locked" 
    200192 
    201     elif [ -f /var/run/${serviceName}.pid ]; then 
     193    elif [ -f ${pidFilePath} ]; then 
    202194        echo $"$prog is dead but pid file $pidFilePath exists" 
    203195    else 
     
    221213    ;; 
    222214    condrestart) 
    223     if [ -f /var/run/${serviceName}.pid ] ; then 
     215    if [ -f ${pidFilePath} ] ; then 
    224216        stop 
    225217        start 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/share/ndg-gk

    r2214 r2369  
    3939# write permission on /var/run.  Move file from /tmp to /var/run as root -  
    4040# see below ... 
    41 pidFilePath=/tmp/${serviceName}.pid 
     41pidFilePath=/var/run/${serviceName}.pid 
    4242 
    4343# Command line args e.g. set alternative port number or configuration file 
     
    6363    # See if it's already running. Look *only* at the pid file. 
    6464    local pid= 
    65     if [ -f /var/run/${serviceName}.pid ]; then 
     65    if [ -f ${pidFilePath} ]; then 
    6666        local line p 
    67         read line < /var/run/${serviceName}.pid 
     67        read line < ${pidFilePath} 
    6868        for p in $line ; do 
    6969            [ -z "${p//[0-9]/}" -a -d "/proc/$p" ] && pid="$pid $p" 
     
    7777    ulimit -S -c 0 >/dev/null 2>&1 
    7878 
    79         if [ ! -f ${tacFilePath} ]; then 
    80             failure $"Path to python .tac file not found:" 
    81             return 
    82         fi 
     79    if [ ! -f ${tacFilePath} ]; then 
     80        failure $"Path to python .tac file not found:" 
     81        return 
     82    fi 
    8383 
    8484    # Echo daemon 
     
    9292        # in to give twistd some leaway 
    9393        i=0 
    94         while [ ! -f /tmp/${serviceName}.pid ] && [ "$i" -lt 10 ]; do  
     94        while [ ! -f ${pidFilePath} ] && [ "$i" -lt 10 ]; do  
    9595            sleep 1;  
    9696            let "i++";  
    9797        done 
    9898     
    99         mv /tmp/${serviceName}.pid /var/run/${serviceName}.pid 
    100          
    101         # Put in placeholder so as not to upset twistd when it looks for it 
    102         # on shutdown 
    103         touch /tmp/${serviceName}.pid 
    104         chown ${uid}:${gid} /tmp/${serviceName}.pid 
    105          
    10699        touch /var/lock/subsys/${serviceName}         
    107100        success $"startup" 
     
    120113    # Find pid 
    121114    pid= 
    122     if [ -f /var/run/${serviceName}.pid ]; then 
     115    if [ -f ${pidFilePath} ]; then 
    123116       local line p 
    124        read line < /var/run/${serviceName}.pid 
     117       read line < ${pidFilePath} 
    125118       for p in $line ; do 
    126119           [ -z "${p//[0-9]/}" -a -d "/proc/$p" ] && pid="$pid $p" 
     
    158151 
    159152    # Remove pid and lock files if any. 
    160     rm -f /var/run/${serviceName}.pid 
     153    rm -f ${pidFilePath} 
    161154    rm -f /var/lock/subsys/${serviceName} 
    162155     
     
    175168{ 
    176169    local pid= 
    177     local pidFilePath=/var/run/${serviceName}.pid 
    178170     
    179171    # Get pid from "/var/run/*.pid" file 
     
    199191        echo $"$prog is dead but subsys locked" 
    200192 
    201     elif [ -f /var/run/${serviceName}.pid ]; then 
     193    elif [ -f ${pidFilePath} ]; then 
    202194        echo $"$prog is dead but pid file $pidFilePath exists" 
    203195    else 
     
    221213    ;; 
    222214    condrestart) 
    223     if [ -f /var/run/${serviceName}.pid ] ; then 
     215    if [ -f ${pidFilePath} ] ; then 
    224216        stop 
    225217        start 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/share/ndg-log

    r2214 r2369  
    3939# write permission on /var/run.  Move file from /tmp to /var/run as root -  
    4040# see below ... 
    41 pidFilePath=/tmp/${serviceName}.pid 
     41pidFilePath=/var/run/${serviceName}.pid 
    4242 
    4343# Command line args e.g. set alternative port number or configuration file 
     
    6363    # See if it's already running. Look *only* at the pid file. 
    6464    local pid= 
    65     if [ -f /var/run/${serviceName}.pid ]; then 
     65    if [ -f ${pidFilePath} ]; then 
    6666        local line p 
    67         read line < /var/run/${serviceName}.pid 
     67        read line < ${pidFilePath} 
    6868        for p in $line ; do 
    6969            [ -z "${p//[0-9]/}" -a -d "/proc/$p" ] && pid="$pid $p" 
     
    7777    ulimit -S -c 0 >/dev/null 2>&1 
    7878 
    79         if [ ! -f ${tacFilePath} ]; then 
    80             failure $"Path to python .tac file not found:" 
    81             return 
    82         fi 
     79    if [ ! -f ${tacFilePath} ]; then 
     80        failure $"Path to python .tac file not found:" 
     81        return 
     82    fi 
    8383 
    8484    # Echo daemon 
     
    9292        # in to give twistd some leaway 
    9393        i=0 
    94         while [ ! -f /tmp/${serviceName}.pid ] && [ "$i" -lt 10 ]; do  
     94        while [ ! -f ${pidFilePath} ] && [ "$i" -lt 10 ]; do  
    9595            sleep 1;  
    9696            let "i++";  
    9797        done 
    9898     
    99         mv /tmp/${serviceName}.pid /var/run/${serviceName}.pid 
    100          
    101         # Put in placeholder so as not to upset twistd when it looks for it 
    102         # on shutdown 
    103         touch /tmp/${serviceName}.pid 
    104         chown ${uid}:${gid} /tmp/${serviceName}.pid 
    105          
    10699        touch /var/lock/subsys/${serviceName}         
    107100        success $"startup" 
     
    120113    # Find pid 
    121114    pid= 
    122     if [ -f /var/run/${serviceName}.pid ]; then 
     115    if [ -f ${pidFilePath} ]; then 
    123116       local line p 
    124        read line < /var/run/${serviceName}.pid 
     117       read line < ${pidFilePath} 
    125118       for p in $line ; do 
    126119           [ -z "${p//[0-9]/}" -a -d "/proc/$p" ] && pid="$pid $p" 
     
    158151 
    159152    # Remove pid and lock files if any. 
    160     rm -f /var/run/${serviceName}.pid 
     153    rm -f ${pidFilePath} 
    161154    rm -f /var/lock/subsys/${serviceName} 
    162155     
     
    175168{ 
    176169    local pid= 
    177     local pidFilePath=/var/run/${serviceName}.pid 
    178170     
    179171    # Get pid from "/var/run/*.pid" file 
     
    199191        echo $"$prog is dead but subsys locked" 
    200192 
    201     elif [ -f /var/run/${serviceName}.pid ]; then 
     193    elif [ -f ${pidFilePath} ]; then 
    202194        echo $"$prog is dead but pid file $pidFilePath exists" 
    203195    else 
     
    221213    ;; 
    222214    condrestart) 
    223     if [ -f /var/run/${serviceName}.pid ] ; then 
     215    if [ -f ${pidFilePath} ] ; then 
    224216        stop 
    225217        start 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/share/ndg-sm

    r2214 r2369  
    3939# write permission on /var/run.  Move file from /tmp to /var/run as root -  
    4040# see below ... 
    41 pidFilePath=/tmp/${serviceName}.pid 
     41pidFilePath=/var/run/${serviceName}.pid 
    4242 
    4343# Command line args e.g. set alternative port number or configuration file 
     
    6363    # See if it's already running. Look *only* at the pid file. 
    6464    local pid= 
    65     if [ -f /var/run/${serviceName}.pid ]; then 
     65    if [ -f ${pidFilePath} ]; then 
    6666        local line p 
    67         read line < /var/run/${serviceName}.pid 
     67        read line < ${pidFilePath} 
    6868        for p in $line ; do 
    6969            [ -z "${p//[0-9]/}" -a -d "/proc/$p" ] && pid="$pid $p" 
     
    7777    ulimit -S -c 0 >/dev/null 2>&1 
    7878 
    79         if [ ! -f ${tacFilePath} ]; then 
    80             failure $"Path to python .tac file not found:" 
    81             return 
    82         fi 
     79    if [ ! -f ${tacFilePath} ]; then 
     80        failure $"Path to python .tac file not found:" 
     81        return 
     82    fi 
    8383 
    8484    # Echo daemon 
     
    9292        # in to give twistd some leaway 
    9393        i=0 
    94         while [ ! -f /tmp/${serviceName}.pid ] && [ "$i" -lt 10 ]; do  
     94        while [ ! -f ${pidFilePath} ] && [ "$i" -lt 10 ]; do  
    9595            sleep 1;  
    9696            let "i++";  
    9797        done 
    9898     
    99         mv /tmp/${serviceName}.pid /var/run/${serviceName}.pid 
    100          
    101         # Put in placeholder so as not to upset twistd when it looks for it 
    102         # on shutdown 
    103         touch /tmp/${serviceName}.pid 
    104         chown ${uid}:${gid} /tmp/${serviceName}.pid 
    105          
    10699        touch /var/lock/subsys/${serviceName}         
    107100        success $"startup" 
     
    120113    # Find pid 
    121114    pid= 
    122     if [ -f /var/run/${serviceName}.pid ]; then 
     115    if [ -f ${pidFilePath} ]; then 
    123116       local line p 
    124        read line < /var/run/${serviceName}.pid 
     117       read line < ${pidFilePath} 
    125118       for p in $line ; do 
    126119           [ -z "${p//[0-9]/}" -a -d "/proc/$p" ] && pid="$pid $p" 
     
    158151 
    159152    # Remove pid and lock files if any. 
    160     rm -f /var/run/${serviceName}.pid 
     153    rm -f ${pidFilePath} 
    161154    rm -f /var/lock/subsys/${serviceName} 
    162155     
     
    175168{ 
    176169    local pid= 
    177     local pidFilePath=/var/run/${serviceName}.pid 
    178170     
    179171    # Get pid from "/var/run/*.pid" file 
     
    199191        echo $"$prog is dead but subsys locked" 
    200192 
    201     elif [ -f /var/run/${serviceName}.pid ]; then 
     193    elif [ -f ${pidFilePath} ]; then 
    202194        echo $"$prog is dead but pid file $pidFilePath exists" 
    203195    else 
     
    221213    ;; 
    222214    condrestart) 
    223     if [ -f /var/run/${serviceName}.pid ] ; then 
     215    if [ -f ${pidFilePath} ] ; then 
    224216        stop 
    225217        start 
  • TI12-security/trunk/python/ndg.security.server/setup.py

    r2298 r2369  
    5252setup( 
    5353    name =                      'ndg_security_server', 
    54     version =                   '0.7.2', 
     54    version =                   '0.7.3', 
    5555    description =               'NERC DataGrid Security Services', 
    5656    long_description =          'Server side component for securing NDG resources', 
  • TI12-security/trunk/python/ndg.security.test/setup.py

    r2287 r2369  
    3333setup( 
    3434    name =                      'ndg_security_test', 
    35     version =                   '0.7.2', 
     35    version =                   '0.7.3', 
    3636    description =               'NERC DataGrid Security Unit tests', 
    3737    long_description =          'Unit tests client - server side', 
Note: See TracChangeset for help on using the changeset viewer.