Index: man/cups-lpd.man.in =================================================================== --- man/cups-lpd.man.in (revision 7824) +++ man/cups-lpd.man.in (working copy) @@ -3,7 +3,7 @@ .\" .\" cups-lpd man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007 by Apple Inc. +.\" Copyright 2007-2008 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -12,12 +12,14 @@ .\" which should have been included with this file. If this file is .\" file is missing or damaged, see the license at "http://www.cups.org/". .\" -.TH cups-lpd 8 "Common UNIX Printing System" "24 April 2006" "Apple Inc." +.TH cups-lpd 8 "Common UNIX Printing System" "4 August 2008" "Apple Inc." .SH NAME cups-lpd \- receive print jobs and report printer status to lpd clients .SH SYNOPSIS .B cups-lpd -[ -n ] [ -o +[ -h +.I hostname[:port] +] [ -n ] [ -o .I option=value ] .SH DESCRIPTION @@ -59,6 +61,10 @@ .fi .SH OPTIONS .TP 5 +.h hostname[:port] +.br +Sets the CUPS server (and port) to use. +.TP 5 -n .br Disables reverse address lookups; normally \fIcups-lpd\fR will Index: scheduler/cups-lpd.c =================================================================== --- scheduler/cups-lpd.c (revision 7824) +++ scheduler/cups-lpd.c (working copy) @@ -148,6 +148,19 @@ { switch (argv[i][1]) { + case 'h' : /* -h hostname[:port] */ + if (argv[i][2]) + cupsSetServer(argv[i] + 2); + else + { + i ++; + if (i < argc) + cupsSetServer(argv[i]); + else + syslog(LOG_WARNING, "Expected hostname string after -h option!"); + } + break; + case 'o' : /* Option */ if (argv[i][2]) num_defaults = cupsParseOptions(argv[i] + 2, num_defaults,