Print this page
2837 - remove print/lp* from gate and use CUPS from userland


 636                          * of time is variable, depending on system load, etc.
 637                          * so we want to allow a little "slop" in the value of
 638                          * "when".  this way, if a log should be rotated every
 639                          * week, and the number of seconds passed is really a
 640                          * few seconds short of a week, we'll go ahead and
 641                          * rotate the log as expected.
 642                          *
 643                          */
 644                         if (when >= 60 * 60)
 645                                 when -= 59;
 646 
 647                         /*
 648                          * last rotation is recorded as argument to -P,
 649                          * but if logname isn't the same as log file name
 650                          * then the timestamp would be recorded on a
 651                          * separate line in the timestamp file.  so if we
 652                          * haven't seen a -P already, we check to see if
 653                          * it is part of a specific entry for the log
 654                          * file name.  this handles the case where the
 655                          * logname is "apache", it supplies a log file
 656                          * name like "/var/apache/logs/[a-z]*_log",
 657                          * which expands to multiple file names.  if one
 658                          * of the file names is "/var/apache/logs/access_log"
 659                          * the the -P will be attached to a line with that
 660                          * logname in the timestamp file.
 661                          */
 662                         if (opts_count(opts, "P")) {
 663                                 off_t last = opts_optarg_int(opts, "P");
 664 
 665                                 /* return if not enough time has passed */
 666                                 if (Now - last < when)
 667                                         return (B_TRUE);
 668                         } else if ((cfopts = conf_opts(fname)) != NULL &&
 669                             opts_count(cfopts, "P")) {
 670                                 off_t last = opts_optarg_int(cfopts, "P");
 671 
 672                                 /*
 673                                  * just checking this means this entry
 674                                  * is now "done" if we're going through
 675                                  * the entire conffile
 676                                  */
 677                                 Donenames = lut_add(Donenames, fname, "1");
 678 




 636                          * of time is variable, depending on system load, etc.
 637                          * so we want to allow a little "slop" in the value of
 638                          * "when".  this way, if a log should be rotated every
 639                          * week, and the number of seconds passed is really a
 640                          * few seconds short of a week, we'll go ahead and
 641                          * rotate the log as expected.
 642                          *
 643                          */
 644                         if (when >= 60 * 60)
 645                                 when -= 59;
 646 
 647                         /*
 648                          * last rotation is recorded as argument to -P,
 649                          * but if logname isn't the same as log file name
 650                          * then the timestamp would be recorded on a
 651                          * separate line in the timestamp file.  so if we
 652                          * haven't seen a -P already, we check to see if
 653                          * it is part of a specific entry for the log
 654                          * file name.  this handles the case where the
 655                          * logname is "apache", it supplies a log file
 656                          * name like "/var/apache2/2.2/logs/[a-z]*_log",
 657                          * which expands to multiple file names.  if one of
 658                          * the file names is "/var/apache2/2.2/logs/access_log"
 659                          * the the -P will be attached to a line with that
 660                          * logname in the timestamp file.
 661                          */
 662                         if (opts_count(opts, "P")) {
 663                                 off_t last = opts_optarg_int(opts, "P");
 664 
 665                                 /* return if not enough time has passed */
 666                                 if (Now - last < when)
 667                                         return (B_TRUE);
 668                         } else if ((cfopts = conf_opts(fname)) != NULL &&
 669                             opts_count(cfopts, "P")) {
 670                                 off_t last = opts_optarg_int(cfopts, "P");
 671 
 672                                 /*
 673                                  * just checking this means this entry
 674                                  * is now "done" if we're going through
 675                                  * the entire conffile
 676                                  */
 677                                 Donenames = lut_add(Donenames, fname, "1");
 678