diff -urN cups-1.2.0.orig/scheduler/main.c cups-1.2.0/scheduler/main.c
--- cups-1.2.0.orig/scheduler/main.c 2006-05-10 14:37:13.293405000 -0500
+++ cups-1.2.0/scheduler/main.c 2006-05-10 14:49:23.439036250 -0500
@@ -141,17 +141,32 @@
int launchd_idle_exit;
/* Idle exit on select timeout? */
#endif /* HAVE_LAUNCHD */
-
+ int only_ppds; /* Just build ppds.dat */
/*
* Check for command-line arguments...
*/
fg = 0;
+ only_ppds = 0;
for (i = 1; i < argc; i ++)
if (argv[i][0] == '-')
- for (opt = argv[i] + 1; *opt != '\0'; opt ++)
+ {
+ if (argv[i][1] == '-')
+ {
+ if (!strcmp (&argv[i][2], "ppdsdat"))
+ {
+ fg = only_ppds = 1;
+ }
+ else
+ {
+ fprintf(stderr, "cupsd: Unknown option \'%s\' - aborting!\n",
+ &argv[i][2]);
+ usage(0);
+ }
+ }
+ else for (opt = argv[i] + 1; *opt != '\0'; opt ++)
switch (*opt)
{
case 'c' : /* Configuration file */
@@ -231,6 +246,7 @@
usage(1);
break;
}
+ }
else
{
_cupsLangPrintf(stderr, _("cupsd: Unknown argument \"%s\" - aborting!\n"),
@@ -466,6 +482,9 @@
signal(SIGTERM, sigterm_handler);
#endif /* HAVE_SIGSET */
+ if (only_ppds)
+ return 0;
+
#ifdef __sgi
/*
* Try to create a fake lpsched lock file if one is not already there.
@@ -2247,7 +2266,8 @@
"-f Run in the foreground\n"
"-F Run in the foreground but detach\n"
"-h Show this usage message\n"
- "-l Run cupsd from launchd(8)\n"));
+ "-l Run cupsd from launchd(8)\n"
+ "--ppdsdat Generate ppds database\n"));
exit(status);
}