[Netconf-devel] Re: switchconf
Thomas Hood
jdthood@aglu.demon.nl
Thu, 10 Mar 2005 22:00:10 +0100
On Thu, 2005-03-10 at 16:22 +0100, martin f krafft wrote:
> So in an ideal world, how do you configure the following, based on
> location:
>
> - printers (cups and lpr)
The printers can be defined in /etc/cups/printers.conf and selectively
enabled with cupsenable. I use the following ifupdown hook scripts for
this purpose along with "cups-printers foo" options lines
in /etc/network/interfaces.
#!/bin/sh
# ifup hook script for cupsys-client
[ -x /usr/bin/cupsenable ] || exit 0
[ "$IF_CUPS_PRINTERS" ] || exit 0
/usr/bin/cupsenable $IF_CUPS_PRINTERS
exit 0
#!/bin/sh
# ifdown hook script for cupsys-client
[ -x /usr/bin/cupsdisable ] || exit 0
[ "$IF_CUPS_PRINTERS" ] || exit 0
/usr/bin/cupsdisable $IF_CUPS_PRINTERS
exit 0
> - Xsession files (dual vs. single-head start)
I don't know -- I don't run X dual headed.
> - postfix/exim/sendmail smarthosts
/etc/postfix/main.cf is the last configuration file that I switch
dynamically. I use an ifupdown hook script to set the value of
"relayhost" to the argument of the mail-relay iface option
in /etc/network/interfaces. I can provide the script if you want it.
> - APT sources lists
I don't switch this automatically. In the long run apt should be smart
enough to choose the closest mirror without having to be configured to
do so.
--
Thomas Hood <jdthood@aglu.demon.nl>