[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [leafnode-list] Cannot obtain lock file, aborting.
<x-flowed>
Matthias Andree wrote:
>
> If the SIGKILL arrives before
> the groupinfo file has been written, the groupinfo file is outdated and
> may cause confusion later when the group upper/lower article number
> limits don't match. Articles may be hidden when getting numbers that are
> too low.
That reminds me... I hacked up the following script to rebuild the
groupinfo article counts from the spool from when it was getting corrupted
(as per my other message). Just a crude hack because I was lazy but it
does work :-).
Jifl
#!/bin/sh
# rebuildgroupinfo
SPOOLDIR=/usr/local/var/leafnode
cd $SPOOLDIR
awk '{
GROUP = $1;
LAST = $2;
FIRST = $3;
AGE = $4;
GROUPPATH = $1
gsub( "\\.", "/", GROUPPATH ) ;
CMD = sprintf("find %s -type f 2>/dev/null | sed \"s@.*/@@g;
/\.overview/d\" |sort -n| head -1",GROUPPATH);
if ( (CMD | getline NEWFIRST) > 0)
{
FIRST = NEWFIRST ;
}
close(CMD)
CMD = sprintf("find %s -type f 2>/dev/null | sed \"s@.*/@@g;
/\.overview/d\" |sort -n| tail -1",GROUPPATH);
if ( (CMD | getline NEWLAST) > 0)
{
LAST = NEWLAST
}
close(CMD)
printf("%s %s %s %s ", GROUP, LAST, FIRST, AGE );
for (x=5; x<=NF; x++)
{
printf("%s", $x)
if (x != NF)
printf(" ")
}
printf("\n")
}' leaf.node/groupinfo > leaf.node/groupinfo.new
--
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine
--
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list
</x-flowed>