patch: ovdb & rc.news
Heath Kehoe
heath.kehoe at intermec.com
Wed May 31 19:07:00 UTC 2000
This patch is for the BETA and CURRENT trees.
* rc.news.in: add '-f' flag to ovdb_recover for unclean shutdowns
* rc.news.in: 'rc.news stop' waits for innd to exit by polling the
pid file
* dbprocs.in: 'dbprocs stop' waits for db_checkpoint to exit by
polling the pid file
*** rc.news.in.dist Wed May 31 13:29:40 2000
--- rc.news.in Wed May 31 13:44:05 2000
***************
*** 25,32 ****
rm -f $WATCHPID
fi
! # give innd some time to exit
! sleep 10
# Turn off ovdb support procs, and close the DB environment
if [ "$OVMETHOD" = "ovdb" -a -n "$DB_HOME" ]; then
--- 25,41 ----
rm -f $WATCHPID
fi
! # wait for innd to exit (up to 60 sec)
! i=12
! while [ $i -gt 0 ];
! do
! if [ -f ${SERVERPID} ]; then
! sleep 5
! let i=i-1
! else
! i=0
! fi
! done
# Turn off ovdb support procs, and close the DB environment
if [ "$OVMETHOD" = "ovdb" -a -n "$DB_HOME" ]; then
***************
*** 69,74 ****
--- 78,84 ----
## RFLAG is set below; set INNFLAGS in inn.conf(5)
RFLAG=""
+ OVDBFLAG=""
## Clean shutdown or already running?
if [ -f ${SERVERPID} ] ; then
***************
*** 78,83 ****
--- 88,94 ----
fi
echo 'INND: PID file exists -- unclean shutdown!'
RFLAG="-r"
+ OVDBFLAG="-f"
fi
if [ ! -f ${PATHDB}/.news.daily ] ; then
***************
*** 128,134 ****
## In case the ovdb database was not properly shutdown, this will
## fix it. Must be done before starting innd.
if [ "$OVMETHOD" = "ovdb" -a -n "$DB_HOME" ]; then
! ovdb_recover || {
echo "Can't recover ov database (check news.err for OVDB messages)"
exit 1
}
--- 139,145 ----
## In case the ovdb database was not properly shutdown, this will
## fix it. Must be done before starting innd.
if [ "$OVMETHOD" = "ovdb" -a -n "$DB_HOME" ]; then
! ovdb_recover ${OVDBFLAG} || {
echo "Can't recover ov database (check news.err for OVDB messages)"
exit 1
}
*** dbprocs.in.dist Wed May 31 13:38:57 2000
--- dbprocs.in Wed May 31 13:43:30 2000
***************
*** 25,31 ****
if [ -f $PATHRUN/logremover.pid ]; then
kill -HUP `cat $PATHRUN/logremover.pid`
fi
! sleep 5
# run one more checkpoint just to make sure
db_checkpoint -1
;;
--- 25,42 ----
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
;;
More information about the inn-patches
mailing list