From owner-freebsd-stable@FreeBSD.ORG Wed Apr 23 09:50:10 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AFEEB37B478 for ; Wed, 23 Apr 2003 09:50:10 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3FAEC43FA3 for ; Wed, 23 Apr 2003 09:50:09 -0700 (PDT) (envelope-from andreas@klemm.apsfilter.org) Received: from srv1.cosmo-project.de (localhost [IPv6:::1]) by srv1.cosmo-project.de (8.12.9/8.12.9) with ESMTP id h3NGo7cx011676 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 23 Apr 2003 18:50:07 +0200 (CEST) (envelope-from andreas@klemm.apsfilter.org) Received: (from uucp@localhost)h3NGo7d7011675; Wed, 23 Apr 2003 18:50:07 +0200 (CEST) (envelope-from andreas@klemm.apsfilter.org) Received: from titan.klemm.apsfilter.org (localhost.klemm.apsfilter.org [127.0.0.1]) by klemm.apsfilter.org (8.12.9/8.12.8) with ESMTP id h3NGnQ7E004389; Wed, 23 Apr 2003 18:49:31 +0200 (CEST) (envelope-from andreas@titan.klemm.apsfilter.org) Received: (from andreas@localhost) by titan.klemm.apsfilter.org (8.12.9/8.12.8/Submit) id h3NGnQO2004388; Wed, 23 Apr 2003 18:49:26 +0200 (CEST) Date: Wed, 23 Apr 2003 18:49:26 +0200 From: Andreas Klemm To: apsfilter-help@apsfilter.org Message-ID: <20030423164926.GA2806@titan.klemm.apsfilter.org> References: <20030422100628.S50586-100000@hurricane.math.miami.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bg08WKrSYDhXBjb5" Content-Disposition: inline In-Reply-To: <20030422100628.S50586-100000@hurricane.math.miami.edu> X-Operating-System: FreeBSD 4.8-STABLE X-Disclaimer: A free society is one where it is safe to be unpopular User-Agent: Mutt/1.5.3i cc: freebsd-stable@freebsd.org Subject: Re: apsfilter warning: unknown option 'myhost.mydomain.com' X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2003 16:50:11 -0000 --bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 22, 2003 at 10:09:10AM -0400, jef moskot wrote: > I am having the exact same problem mentioned here: > http://www.apsfilter.org/Lists-Archives/apsfilter-stable-0211/msg00020.ht= ml >=20 > This is a fresh install of the FreeBSD port: apsfilter-7.2.5_1 > The OS is also a fresh install of FreeBSD 4.8-RELEASE. > Was a solution ever found for this issue? [ Cc'd to FreeBSD-STABLE mailinglist folks, did something change in -STABLE concerning writing of the printer control file ? apsfilter now gets the FQDN as=20 print option which causes an apsfilter warning. I could workaround this, but question myself if I overlooked it the last years or if something changed in -stable ??? ] Well, its only a warning, you could simply comment out the code segment. Strange, something seem to have changed, since I can't remember, that we noticed these warnings, when we implemented in apsfilter the code to use lprs -C option (-Z when using lprng) for apsfilter commands. Something seem to have changed in the way FreeBSD handles writing print control files or we simply overlooked them in the logfile. Here what happens: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Case 1: lpr without -C options produces apsfilter warning apsfilter warning: unknown option 'titan.klemm.apsfilter.org' =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D root# cd /var/spool/lpd/lp root# lpr /etc/passwd root# cat cf* Htitan.klemm.apsfilter.org Proot Ctitan.klemm.apsfilter.org ^^^^^^^^^^^^^^^^^^^^^^^^^ <--- if no -C option, then hostname will be inserted automatically !!!! this option isn't understood as a valid apsfilter command. fdfA015titan.klemm.apsfilter.org UdfA015titan.klemm.apsfilter.org N/etc/passwd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Case 2: lpr with -C options don't produce any warning =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D root# cd /var/spool/lpd/lp root# lpr -C header:border /etc/passwd root# cat cfA016titan.klemm.apsfilter.org Htitan.klemm.apsfilter.org Proot Cheader:border ^^^^^^^^^^^^^ <--- now the hostname vanishes and you only see the print options for apsfilter. Therefore no warning here. fdfA016titan.klemm.apsfilter.org UdfA016titan.klemm.apsfilter.org N/etc/passwd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Apsfilter code segment =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D #--------------------------------------------------------------------------= --- # Parse the command line options (via -C, -Z and -o). #--------------------------------------------------------------------------= --- if [ "$CLASS$Z_OPTS" ]; then old_ifs=3D"$IFS" IFS=3D:, set -- $CLASS $Z_OPTS IFS=3D"$old_ifs" unset old_ifs for option; do case "$option" in lo|low) # printing quality QUALITY=3Dlow ;; ... ... *) # unknown option echo >&2 "apsfilter warning: unknown option '$option'" ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ !!!! the unknown option in this case is the hostname if -C isn't used as lpr command line option. esac done unset option fi Well to be honest ... apsfilter "misuses" the -C option of the lpr command for own purposes. Normally used for the burst page only. And if -C is left out prints the hostname on burstpage. -C class Job classification to use on the burst page. For example, lpr -C EECS foo.c causes the system name (the name returned by hostname(1)) to be replaced on the burst page by EECS, and the file foo.c to be printed. Simple workaround would be to remove the last case in apsfilter and to silently ifnore unknown apsfilter options. Andreas /// --=20 Andreas Klemm Apsfilter Homepage http://www.apsfilter.org Support over mailing-lists (only!) http://www.apsfilter.org/support Mailing-list archive http://www.apsfilter.org/Lists-Archives --bg08WKrSYDhXBjb5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+psQVd3o+lGxvbLoRAr/VAKCpLXcqsejuP378B5xEbZZddVqfJwCgmHd9 gybmvY0DTjU45f5DA3g55Sc= =nG7D -----END PGP SIGNATURE----- --bg08WKrSYDhXBjb5--