ispsetup (was: Re: FreeBSD in Dixons)
Brian Somers
brian at Awfulhak.org
Sat Mar 11 20:31:10 GMT 2000
I haven't looked at the code yet, but....
> Comments:
> * It *really* needs a better interface. I think dialog would be good
> and would match tzsetup(8).
> * It really shows why you should do stuff like this in perl or python.
> Some of sh's programming constructs are very obscure and
> unmaintanable...
probably true.
> * We need to sit down together and figure out 90% of the variables
> needed to configure each service for an isp. There are a number of
> issues involved. The biggie for me is how to do resolv.conf
> correctly, even in the case of multiple isp's (not all of them give
> DNS configuration through IPCP).
This has just got better. There's now (patch ready for Monday) a
``resolv'' command in ppp:
resolv command
This command controls ppps manipulation of the resolv.conf(5) file.
When ppp starts up, it loads the contents of this file into memory
and retains this image for future use. command is one of the follow-
ing:
readonly Treat /etc/resolv.conf as read only. If ``dns'' is en-
abled, ppp will still attempt to negotiate nameservers with
the peer, making the results available via the DNS0 and
DNS1 macros. This is the opposite of the ``resolv
writable'' command.
reload Reload /etc/resolv.conf into memory. This may be necessary
if for example a DHCP client overwrote /etc/resolv.conf.
restore Replace /etc/resolv.conf with the version originally read
at startup or with the last ``resolv reload'' command.
This is sometimes a useful command to put in the
/etc/ppp/ppp.linkdown file.
rewrite Rewrite the /etc/resolv.conf file. This command will work
even if the ``resolv readonly'' command has been used. It
may be useful as a command in the /etc/ppp/ppp.linkup file
if you wish to defer updating /etc/resolv.conf until after
other commands have finished.
writable Allow ppp to update /etc/resolv.conf if ``dns'' is enabled
and ppp successfully negotiates a DNS. This is the oppo-
site of the ``resolv readonly'' command.
Most ISPs (are Demon the only ones that don't these days?) will
negotiate DNS during IPCP. If they don't, we need to put them in the
config file.
We always want ``resolv restore'' in ppp.linkdown.
Ppp is then happy to rewrite resolv.conf and put it back when it's
done, but for those of us who use named, we want a small ``setdns''
script. I happen to have a rather crude one here that replaces the
forwarders line in named.conf and HUPs named. I could tart it up a
bit and the use of it could be based on /etc/rc.conf containing
named_enable=YES.
> * A number of configuration issues depend on which port/package has been
> installed. eg: sendmail vs postifx vs exim vs qmail or perhaps squid
> vs. wwwoffle. I'm not entirely sure how best to approach this.
I reckon the aim should be to provide a list of possibilities,
indicating which of these would need to be installed. The
possibilities would be limited to what the writer understands/knows/
likes...
> Anyway, have a look and let me know what you think.
>
> -Dom
Will do.
--
Brian <brian at Awfulhak.org> <brian@[uk.]FreeBSD.org>
<http://www.Awfulhak.org> <brian@[uk.]OpenBSD.org>
Don't _EVER_ lose your sense of humour !
More information about the Ukfreebsd
mailing list