[1820] in Moira Commits
/svn/moira r3967 - trunk/moira/gen
daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Mon Jan 25 12:03:18 2010
Date: Mon, 25 Jan 2010 12:03:16 -0500
From: Garry Zacheiss <zacheiss@MIT.EDU>
Message-Id: <201001251703.o0PH3GDA011550@drugstore.mit.edu>
To: moira-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: zacheiss
Date: 2010-01-25 12:03:16 -0500 (Mon, 25 Jan 2010)
New Revision: 3967
Modified:
trunk/moira/gen/dhcp.pc
trunk/moira/gen/hesiod.pc
trunk/moira/gen/mailhub.pc
Log:
Output records for status 1 and status 2 machines.
Modified: trunk/moira/gen/dhcp.pc
===================================================================
--- trunk/moira/gen/dhcp.pc 2010-01-12 22:06:35 UTC (rev 3966)
+++ trunk/moira/gen/dhcp.pc 2010-01-25 17:03:16 UTC (rev 3967)
@@ -72,14 +72,14 @@
EXEC SQL SELECT COUNT(service) INTO :alcount FROM serverhosts sh, machine m
WHERE (sh.service = 'PRINT' OR sh.service = 'CUPS-PRINT')
AND sh.mach_id = m.mach_id
- AND m.status = 1 AND m.address != 'unassigned';
+ AND (m.status = 1 OR m.status = 2) AND m.address != 'unassigned';
allowlist = malloc(alcount * sizeof(*allowlist));
EXEC SQL DECLARE csr_spool CURSOR FOR
SELECT m.address, sh.value3 FROM machine m, serverhosts sh
WHERE m.mach_id = sh.mach_id AND
(sh.service = 'PRINT' OR sh.service = 'CUPS-PRINT')
- AND m.status = 1 AND m.address != 'unassigned';
+ AND (m.status = 1 OR m.status = 2) AND m.address != 'unassigned';
EXEC SQL OPEN csr_spool;
for (i = 0; i < alcount; i++)
{
Modified: trunk/moira/gen/hesiod.pc
===================================================================
--- trunk/moira/gen/hesiod.pc 2010-01-12 22:06:35 UTC (rev 3966)
+++ trunk/moira/gen/hesiod.pc 2010-01-25 17:03:16 UTC (rev 3967)
@@ -148,7 +148,7 @@
EXEC SQL DECLARE m_cursor CURSOR FOR
SELECT name, mach_id
FROM machine
- WHERE status = 1 and mach_id != 0
+ WHERE (status = 1 OR status = 2) and mach_id != 0
ORDER BY mach_id;
EXEC SQL OPEN m_cursor;
while (1)
Modified: trunk/moira/gen/mailhub.pc
===================================================================
--- trunk/moira/gen/mailhub.pc 2010-01-12 22:06:35 UTC (rev 3966)
+++ trunk/moira/gen/mailhub.pc 2010-01-25 17:03:16 UTC (rev 3967)
@@ -148,7 +148,7 @@
EXEC SQL DECLARE m_cursor CURSOR FOR
SELECT mach_id, name
FROM machine
- WHERE status = 1
+ WHERE (status = 1 OR status = 2)
AND ( mach_id IN ( SELECT UNIQUE pop_id FROM users ) OR
mach_id IN ( SELECT UNIQUE mach_id FROM filesys
WHERE type = 'IMAP' ) )
@@ -178,7 +178,7 @@
EXEC SQL DECLARE e_cursor CURSOR FOR
SELECT mach_id, name
FROM machine
- WHERE status = 1
+ WHERE (status = 1 OR status = 2)
AND mach_id in (SELECT UNIQUE exchange_id FROM users)
ORDER BY mach_id;
EXEC SQL OPEN e_cursor;