From 684a6cca9932fd57dcab4bb4edda01d6867c5159 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 3 Apr 2007 19:12:51 +0200 Subject: [PATCH] dhcptail changes for TG07. --- clients/dhcptail.pl | 4 ++-- web/make-switches.pl | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/clients/dhcptail.pl b/clients/dhcptail.pl index a1e1c62..6a529de 100755 --- a/clients/dhcptail.pl +++ b/clients/dhcptail.pl @@ -7,7 +7,7 @@ use strict; use warnings; # WARNING: CHANGE THIS! :-P -my $year = 2006; +my $year = 2007; my %months = ( Jan => 1, @@ -31,7 +31,7 @@ while (<>) { if (!defined($dbh) || !$dbh->ping) { $dbh = nms::db_connect(); - $q = $dbh->prepare("UPDATE dhcp SET last_ack=? WHERE inet ? << network AND ( last_ack < ? OR last_ack IS NULL )") + $q = $dbh->prepare("UPDATE dhcp SET last_ack=? WHERE ?::inet << network AND ( last_ack < ? OR last_ack IS NULL )") or die "Couldn't prepare query"; } diff --git a/web/make-switches.pl b/web/make-switches.pl index 2829ed7..e1d3fe9 100644 --- a/web/make-switches.pl +++ b/web/make-switches.pl @@ -22,7 +22,7 @@ while () { $name =~ /e(\d+)-(\d+)/; my ($e, $s) = ($1, $2); - my $x = int(202 + $e * 8.25); + my $x = int(244 + $e * 9.87); my $y; $x += 7 if ($e >= 19); @@ -35,12 +35,12 @@ while () { $c = $e; $d = ($s - 1) * 64; - $y = 470 - $s * 48; + $y = 455 - $s * 48; } else { $c = $e + 1; $d = ($s - 4) * 64; - $y = 400 - $s * 48 - ($s - 3) * 2; + $y = 424 - $s * 48 - ($s - 3) * 2; } my $xx = $x + 12; -- 2.39.2