]> andersk Git - moira.git/blobdiff - gen/boot.pc
No restriction on list names.
[moira.git] / gen / boot.pc
index 6679575f324277a8119ea2ae792dfcaffc39b967..f7f127578bbd712d1f96184dec38f3c35a0945ac 100644 (file)
@@ -130,11 +130,11 @@ int main(int argc, char **argv)
 
       fprintf(out, "# %s: %s\n# contact: %s\n%s:\\\n\t:tc=net%s.global:\\\n"
              "\t:ht=ethernet:\\\n\t:ha=%s:\\\n\t:ip=%s:\\\n"
-             "\t:lg=%s:\\\n\t:vm=rfc1048:\n",
+             "\t:lg=%s:\\\n\t:vm=rfc1048:",
              shortname, location, contact, name, net, hwaddr, addr, logaddr);
-      if (!strcmp(hwtype, "HP"))
-       fprintf(out, "\t:T144=\"/hp/%s\":\\\n", shortname);
-      fprintf(out, "\n");
+      if (!strncmp(hwtype, "HP", 2))
+       fprintf(out, "\\\n\t:T144=\"/hp/%s\":", shortname);
+      fprintf(out, "\n\n");
     }
   EXEC SQL CLOSE csr_boot;
   tarfile_end(tf);
@@ -144,7 +144,7 @@ int main(int argc, char **argv)
     SELECT LOWER(m.name), m.hwaddr, m2.address, m3.address, pr.type,
     pr.location, pr.contact, TO_CHAR(pr.modtime, :unixtime_fmt)
     FROM printers pr, machine m, machine m2, machine m3
-    WHERE pr.hwtype = 'HP' AND pr.mach_id != 0
+    WHERE pr.hwtype LIKE 'HP%' AND pr.mach_id != 0
     AND pr.mach_id = m.mach_id AND pr.rm = m2.mach_id
     AND pr.loghost = m3.mach_id AND pr.type != 'ALIAS';
   EXEC SQL OPEN csr_boot2;
This page took 0.036862 seconds and 4 git commands to generate.