What's the best way to automatically swap smart hosts (sendmail)?

pll at lanminds.com pll at lanminds.com
Tue Jul 1 11:47:08 EDT 2003


>>>>> On Tue, 1 Jul 2003, "Marc" == Marc Nozell wrote:

  Marc> Mostly because of laziness.

  Marc> Also I can type: connect-sm<tab> and get a list options.

  Marc> I also have a bunch of connect-vnc*, connect-squid*, connect-
  Marc> nntp*, etc scripts. 

  Marc> Again they could be consolidated, but not worth the bother.

Hmmm, you could maintain a single script which does all the work, 
then symlink it to a new name.  Add some logic to the script which 
determines how it was called ($0), to dictate the action you wish to 
invoke.

This allows you to continue your laziness[1], since you now only have to 
maintain a single script, and allows you to continue using command 
line completion :)

[1]  Well, I guess this actually qualifies as the Perl definition of 
    'laziness' since it does involve a little work up front in order
    to accomplish long-term laziness.  The other method sacrifices
    long-term laziness, actually requiring more work for immediate
    gratification :)
-- 

Seeya,
Paul
--
Key fingerprint = 1660 FECC 5D21 D286 F853  E808 BB07 9239 53F1 28EE

	It may look like I'm just sitting here doing nothing,
   but I'm really actively waiting for all my problems to go away.

	 If you're not having fun, you're not doing it right!





More information about the gnhlug-discuss mailing list