gps-maintain.pl broken
I've had a few problems getting the gps-maintain.pl script working on FreeBSD with perl 5.8.5. Firstly no matter what arguments you would supply it would always return the usage information with no errors.
To resolve this I had to remove line 178:
'h|?|help' => \&usage(),
The second problem is if you run maintenance for removal of old triplets, ie. /usr/local/bin/gps-maintain.pl -delete -age
3110400 /usr/local/etc/gps.conf
It will ignore the age and remove all triplets. To fix this problem I've added the following on line 236:
else {
$sql_clause = " WHERE uts < $uts";
}
Nikolai.
Forums:
- Log in to post comments
Re: gps-maintain.pl broken
Hi Nikolai
havent had time to include this yet. I did soem testing with the new maintenance script and noticed the first problem. Big thanks for the second fix. I will include it as soon as possible.
Re: gps-maintain.pl broken
Sorry about that all, I thought I had posted the script with these corrections.
Patch follows with both corrections:
--- gps-maintain.pl.orig Tue Mar 22 13:53:18 2005
+++ gps-maintain.pl Tue Mar 22 13:59:48 2005
@@ -175,7 +175,7 @@
'eq=i',
'lt=i',
'age=i',
- 'h|?|help' => \&usage(),
+ 'h|?|help' => sub { usage(); },
'<>' => \&saveArgument
);
@@ -232,6 +232,8 @@
} elsif ( exists($opts{'eq'}) ) {
# ??
$sql_clause = " WHERE uts < $uts AND count = $opts{'eq'}";
+} else {
+ $sql_clause = " WHERE uts < $uts";
}
if ( $opts{'verbose'} ) { print STDOUT "sql clause: $sql_clause\n"; }
Re: gps-maintain.pl broken
Thanks to you!
I have updated the script included in gps-1.004