]> andersk Git - moira.git/commitdiff
look at "banner" field to determine values for BANNERFIRST and BANNERLAST
authordanw <danw>
Sat, 6 Feb 1999 18:45:13 +0000 (18:45 +0000)
committerdanw <danw>
Sat, 6 Feb 1999 18:45:13 +0000 (18:45 +0000)
gen/print.pc

index 1fb936d7e1da2fdb9ba80d1f9b71d4b802884631..05333208d07f56f5df9b6a3691db73062328c5d6 100644 (file)
@@ -72,7 +72,7 @@ void do_host(char *host)
   char modtime[PRINTERS_MODTIME_SIZE], lmodtime[LIST_MODTIME_SIZE];
   char contact[PRINTERS_CONTACT_SIZE];
   char *spoolhost = host, *unixtime_fmt = UNIXTIME_FMT;
-  int ka, pc, ac, lpc_acl;
+  int ka, pc, ac, lpc_acl, banner;
   EXEC SQL END DECLARE SECTION;
   TARFILE *tf;
   FILE *out;
@@ -155,7 +155,7 @@ void do_host(char *host)
 
   EXEC SQL DECLARE csr_spool CURSOR FOR
     SELECT UNIQUE pr.rp, pr.duplexname, pr.hwtype, m.name, pr.ac,
-    pr.lpc_acl, TO_CHAR(pr.modtime, :unixtime_fmt)
+    pr.lpc_acl, pr.banner, TO_CHAR(pr.modtime, :unixtime_fmt)
     FROM printers pr, machine m, machine mrm
     WHERE m.mach_id = pr.mach_id
     AND mrm.mach_id = pr.rm AND mrm.name = :spoolhost;
@@ -163,7 +163,7 @@ void do_host(char *host)
   while (1)
     {
       EXEC SQL FETCH csr_spool INTO :name, :duplexname, :hwtype,
-       :hostname, :ac, :lpc_acl, :modtime;
+       :hostname, :ac, :lpc_acl, :banner, :modtime;
       if (sqlca.sqlcode)
        break;
 
@@ -182,10 +182,11 @@ void do_host(char *host)
          sprintf(filename, "/var/spool/printer/%s/.options", name);
          out = tarfile_start(tf, filename, 0755, 1, 1, "daemon", "daemon",
                              mtime);
-         fprintf(out, "BANNERFIRST=1\nBANNERLAST=0\nREVERSE=\n"
+         fprintf(out, "BANNERFIRST=%d\nBANNERLAST=%d\nREVERSE=\n"
                  "DUPLEXING=0\nINTERFACE=0\nNETNAME=%s\nPRINTER=%s\n"
                  "export BANNERFIRST BANNERLAST REVERSE DUPLEXING\n"
                  "export PRINTER NETNAME INTERFACE VERBOSELOG\n",
+                 banner == PRN_BANNER_FIRST, banner == PRN_BANNER_LAST,
                  hostname, name);
          tarfile_end(tf);
        }
This page took 0.035796 seconds and 5 git commands to generate.