Re: redirecting printing

From: MARLON BORBA (MBORBA@TRF3.GOV.BR)
Date: Tue May 20 2003 - 15:58:21 EDT


an even simpler way is to use sed to change the hosts file. no file copying, no symbolic links.

greetz,

marlon.

/*
Marlon Borba
Divisao de Suporte Tecnico
TRF 3a. Regiao
(11) 3311-4683 e 9692-8357
mborba@trf3.gov.br - marlonborba@acm.org
-------
"We reject kings, presidents, and voting. We
believe in rough consensus and a
running code."
--Dave Clark, pioneiro da Internet
*/

>>> b.r.zimmer@WORLDNET.ATT.NET 20/05/03 16:30 >>>
        I would suggest only one change and that would be to have 3
hosts files hosts, hosts.6am hosts.6pm. Then copy the appropriate file
at the required time. If you move files, and the system is down when
one is to be changed, you could lose one of your files

16:59 hosts hosts.6pm
17:00 hosts.6am hosts
03:00 <system down for maintenance>
                Problems and system doesn't
                Come back up until 16:00
16:59 hosts.6am hosts
17:00 hosts.6am gone hosts.6am contains the hosts.6pm
contents

        Granted hypothetical at best, and we all know that IBM gear
doesn't stay down that long because we have no problems. But I have
this friend named Murphy that always seems to get in the way...

Bruce Zimmer
Central Data Systems
(248) 615-4644 (direct)
(248) 320-1175 (cell)
bzimmer@centraldata.com

-----Original Message-----
From: IBM AIX Discussion List [mailto:aix-l@Princeton.EDU] On Behalf Of
Ron Schwingel
Sent: Tuesday, May 20, 2003 11:25 AM
To: aix-l@Princeton.EDU
Subject: Re: redirecting printing

You could create two separate hosts files. The default "hosts" file
would
be the 6:00am to 6:00pm hosts file. The other "hosts" file (hosts.6pm)
would
be an exact copy of the original, but contain the alternate print
queue's ip
address. Create two cron entries, one that executes at 6:00pm and
renames
the default "hosts" file to "hosts.6am" and the "hosts.6pm" to "hosts".
The
second cron entry would execute at 6:00am and rename the current "hosts"
file back to "hosts.6pm" and the "hosts.6am" file back to "hosts".

Ron Schwingel
Technical Support

NDS Solutions
303.755.4411(phone)
303.755.4545(fax)
rschwing@ndsltd.com

-----Original Message-----
From: Shawn Bierman [mailto:BiermanS@METHODISTHEALTH.ORG]
Sent: Friday, May 16, 2003 12:28 PM
To: aix-l@Princeton.EDU
Subject: Re: redirecting printing

We're currently printing using streaming printing from our patient care
application middleware to AIX queue to the print server (HP Jet D's).
Our
current method of redirecting print jobs is to alias the printer dns
name in
the /etc/hosts file to the new IP address and then remove the alias when
the
printer is repaired. Now we have a situation where the current app can
use
a rule to reroute the printer without any OS intervetion. We're leaving
that app and still need to provide a solution where the printer can be
routed and rerouted automatically based on a time interval.

01tcp101 10.10.2.10 #normal address in DNS

etc/host
10tcp101 10.10.2.11 #reroute in host file for repair

>>> Simon.Green@EU.ALTRIA.COM 5/16/03 11:13:06 AM >>>
What sort of printers are these? Remote or local?
Are you printing from AIX, or from some application?

I think it might be possible to mess around with /etc/qconfig - that
would
work OK for remote print queues I'm fairly sure - but my first thought
would
be to pass the print queue to use to the program as a parameter, or
perhaps
have a script which you call from within various scripts/programs which
could check the time and pass back a printer name. (There are several
possibilities along those lines, depending on exactly what you're
doing.)

If you're printing from an application such as SAP, which wouldn't be
amenable to having a print queue as a parameter, you could set up a
dummy
print queue, which is permanently held, then have a background job which
continually checks it and re-queues jobs to the correct printer.

Simon Green
Altria ITSC Europe s.a.r.l.

AIX-L Archive at http://marc.theaimsgroup.com/?l=aix-l&r=1&w=2
AIX FAQ at http://www.faqs.org/faqs/aix-faq/

N.B. Unsolicited email from vendors will not be appreciated.

> -----Original Message-----
> From: Shawn Bierman [mailto:BiermanS@METHODISTHEALTH.ORG]
> Sent: 16 May 2003 16:52
> To: aix-l@Princeton.EDU
> Subject: redirecting printing
>
>
> We have a need to redirect print jobs from PrinterA to
> PrinterB at 6:00am and then at 6:00pm restore the redirect so
> we are printing back to PrinterA, until 6:00am again.
>
> Is there a way to do this with perhaps a cronjob?



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:51 EDT