]> andersk Git - moira.git/commitdiff
Append numbers to MUL entries in filsys.db for use with new version of
authordanw <danw>
Sat, 12 Oct 1996 22:39:13 +0000 (22:39 +0000)
committerdanw <danw>
Sat, 12 Oct 1996 22:39:13 +0000 (22:39 +0000)
attach on machines with new versions of BIND that don't always return
the entries in the same order.

If a printer doesn't have a quotaserver, output the printcap.db line
with no `rq' entry instead of the dubious `rq=(null)'.

gen/hesiod.dc

index d99b2f87c809fd71841fd9c8e7c0099fe2bee8d8..c41149cd7f8beead2591def2ea3d5e2e57f51b26 100644 (file)
@@ -502,21 +502,21 @@ do_filsys()
          WHERE f.filsys_id = g.filsys_id AND g.group_id = :fid
          ORDER BY key, label;
        EXEC SQL OPEN f_cursor2;
-        while (1) {
+        for (flag1=1;;flag1++) {
             EXEC SQL FETCH f_cursor2 INTO :type, :loc, :id, :access,:mount,
                                     :comments, :name, :trans;
             if (sqlca.sqlcode != 0) break;
            strtrim(type);
            if (!strcmp(type, "NFS") || !strcmp(type, "RVD")) {
                if (mach = hash_lookup(machines, id)) {
-                   fprintf(out, "%s.filsys\tHS %s \"%s %s %s %s %s\"\n",
+                   fprintf(out, "%s.filsys\tHS %s \"%s %s %s %s %s %d\"\n",
                            group, HTYPE, type, strtrim(loc), mach,
-                           strtrim(access), strtrim(mount));
+                           strtrim(access), strtrim(mount), flag1);
                }
            } else if (!strcmp(type, "AFS")) {
-               fprintf(out, "%s.filsys\tHS %s \"AFS %s %s %s\"\n",
+               fprintf(out, "%s.filsys\tHS %s \"AFS %s %s %s %d\"\n",
                        group, HTYPE, strtrim(loc), strtrim(access),
-                       strtrim(mount));
+                       strtrim(mount), flag1);
            } else if (!strcmp(type, "ERR")) {
                fprintf(out, "%s.filsys\tHS %s \"ERR %s\"\n",
                        group, HTYPE, strtrim(comments));
@@ -818,7 +818,7 @@ do_printcap()
        strtrim(sd);
        fprintf(out, "%s.pcap\tHS %s \"%s:rp=%s:rm=%s:sd=%s:ka#%d:pc#%d",
                name, HTYPE, name, rp, hash_lookup(machines, rm), sd, ka, pc);
-       if (rq)
+       if (rq && hash_lookup(machines, rq))
          fprintf(out, ":rq=%s\"\n", hash_lookup(machines, rq));
        else
          fputs("\"\n", out);
This page took 1.354004 seconds and 5 git commands to generate.