Changeset 1706 for pykota/trunk/bin

Show
Ignore:
Timestamp:
09/07/04 16:17:19 (20 years ago)
Author:
jalet
Message:

Small addition to catch SIGTERM. Doesn't currently help, though, so needs
more work.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/waitprinter.sh

    r1656 r1706  
    1616# Fix by Matt Hyclak & Jerome Alet 
    1717 
     18trap "KILLED=1" TERM 
     19 
    1820# If ending phase, after the job has been fully transmitted to the printer 
    1921# we have to wait for the printer being in printing mode before checking 
     
    2224if [ x$PYKOTAACTION != "xDENY" ] && [ x$PYKOTAPHASE = "xAFTER" ] ; then 
    2325  until snmpget -v1 -c public -Ov $1 HOST-RESOURCES-MIB::hrPrinterStatus.1 | grep -i printing >/dev/null; do 
    24    sleep 1 ; 
     26    if [ "$KILLED" = 1 ]; then 
     27      break ; 
     28    fi  
     29    sleep 1 ; 
    2530  done 
    2631fi 
     
    2833# In any case, wait until the printer is idle again. 
    2934until snmpget -v1 -c public -Ov $1 HOST-RESOURCES-MIB::hrPrinterStatus.1 | grep -i idle >/dev/null ; do  
     35  if [ "$KILLED" = 1 ]; then 
     36    break ; 
     37  fi  
    3038  sleep 1 ; 
    3139done 
    32