patch: ovdb & rc.news

Heath Kehoe heath.kehoe at intermec.com
Thu Jun 1 20:49:34 UTC 2000


>
>} 1. If INN crashed and left the pid file behind you'd hang for 60 secs
>} 2. "let" is a ksh-ism
>
>I've already committed, but I should have looked it
>more carefully.  Here is a one I wrote.  I tried not
>to use 'echo -n', since it cannot be understood by
>sh in some Unix boxes.
>-- 
>Katsuhiro Kondou
>

I hate trying to write portable sh scripts :)

Here is another update for dbprocs.in (diff from 20000601 snapshot).
It removes the 'let' and rearranges the logic a bit.

-h


*** dbprocs.in.dist	Thu Jun  1 15:25:48 2000
--- dbprocs.in	Thu Jun  1 15:41:08 2000
***************
*** 16,24 ****
  
  stop)
  
-   if [ -f $PATHRUN/db_checkpoint.pid ]; then
-     kill `cat $PATHRUN/db_checkpoint.pid`
-   fi
    if [ -f $PATHRUN/db_deadlock.pid ]; then
      kill `cat $PATHRUN/db_deadlock.pid`
    fi
--- 16,21 ----
***************
*** 25,44 ****
    if [ -f $PATHRUN/logremover.pid ]; then
      kill -HUP `cat $PATHRUN/logremover.pid`
    fi
  
!   i=12
!   while [ $i -gt 0 ];
!   do
!     if [ -f $PATHRUN/db_checkpoint.pid ]; then
        sleep 5
!       let i=i-1
!     else
!       i=0
!     fi
!   done
  
!   # run one more checkpoint just to make sure
!   db_checkpoint -1
    ;;
  
  start)
--- 22,45 ----
    if [ -f $PATHRUN/logremover.pid ]; then
      kill -HUP `cat $PATHRUN/logremover.pid`
    fi
+   if [ -f $PATHRUN/db_checkpoint.pid ]; then
+     kill `cat $PATHRUN/db_checkpoint.pid`
+     sleep 1
  
!     # db_checkpoint may not exit right away if it is in the
!     # middle of a checkpoint.  So we wait for it here.
!     i=12
!     while [ $i -gt 0 ];
!     do
!       [ -f $PATHRUN/db_checkpoint.pid ] || break
        sleep 5
!       i=`expr $i - 1`
!     done
  
!     # run one more checkpoint just to make sure, but not if
!     # the old one is still running
!     [ -f $PATHRUN/db_checkpoint.pid ] || db_checkpoint -1
!   fi
    ;;
  
  start)




More information about the inn-patches mailing list