Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Mar 2000 18:11:52 +0000
From:      dom@happygiraffe.net (Dominic Mitchell)
To:        Brian Somers <brian@Awfulhak.org>, Nik Clayton <nik@FreeBSD.org>, Lee Johnston <lee@uk.freebsd.org>, freebsd-users@uk.freebsd.org, brian@hak.lan.awfulhak.org, freebsd-isp@FreeBSD.org
Subject:   ispsetup (was: Re: FreeBSD in Dixons)
Message-ID:  <20000311181152.A1206@myrddin.demon.co.uk>
In-Reply-To: <20000311000931.A349@myrddin.demon.co.uk>; from Dominic Mitchell on Sat, Mar 11, 2000 at 12:09:31AM %2B0000
References:  <nik@FreeBSD.org> <200003100835.IAA00469@hak.lan.Awfulhak.org> <20000311000931.A349@myrddin.demon.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help

--+QahgC5+KEYLbs62
Content-Type: text/plain; charset=us-ascii

On Sat, Mar 11, 2000 at 12:09:31AM +0000, Dominic Mitchell wrote:
> On Fri, Mar 10, 2000 at 08:35:30AM +0000, Brian Somers wrote:
> > So, how about
> > 
> >    /usr/share/isp/defaults
> >    /usr/share/isp/uk/defaults
> >    /usr/share/isp/uk/pavilion
> >    /usr/share/isp/uk/demon
> >    /usr/share/isp/uk/bt
> >    /usr/share/isp/uk/force9
> > 
> > etc ?  These files would contain the standard bourne shell variable 
> > assignments, and then there'd be
> > 
> >    genconfig [-pnmlis] [otheroptions]
> > 
> > where the above flags generate configurations for ppp, named, mail, 
> > leafnode, innd and squid respectively.  We'd also want flags like 
> > -d domain to auto-specify your domain etc.
> > 
> > Any interest in something like this ?
> 
> Sounds like an excellent idea.  Whilst one can shoehorn everything into
> one big ppp.conf and call it as necessary, the other config files would
> be a lot more difficult.
> 
> > I think the main thing here is to make it easy to add new options - 
> > for example:
> > 
> > /usr/share/isp/uk/someisp
> >   phone=1234567
> >   services=ppp
> >   domain=someisp.co.uk
> > 
> > Would tell the program that it can generate a ppp.conf with the 
> > standard template and only the phone number specified.  It would then 
> > prompt for your authname/authkey and ask if you want to use a login 
> > script (it would generate one with \\U & \\P).  Or
> > 
> > /usr/share/isp/uk/demon
> >   phone=1234567
> >   pppdns=false
> >   proxy=www-cache.demon.co.uk
> >   services=ppp,squid,leafnode
> > 
> > where it prompts for your host/domain, authname and authkey, and allows 
> > you to configure squid using the given proxy) and leafnode using the 
> > standard news.domain.
> 
> This sounds more and more interesting.  Why didn't somebody do this
> years ago?
> 
> I'll have a go at throwing together a sample implementation tonight
> (it's only midnight and I'm bored :) and see what I come up with.

Right, I have a simple prototype ready.  I've attached a file called
ispsetup.tar.gz.  Extract it in ~/tmp.  I've only implemented ppp.conf
setup, but others can work along similiar lines.  Basically, it just
collects parameters and m4's them into config files.

It uses two file-hierarchies, .../isp, which is where the shell-style
isp definition files are stored.  Also, there is .../isp-templates which
contains template configuration files, one per service.  I've also set
up the script to dump config files into .../isp-destdir, just so it
doesn't overwrite your own config files!

ispsetup also uses defaults files, like Brian described.

To run it, just give it a filename, relative to .../isp.  eg:

$ ispsetup.sh uk/demon

Optionally, you give a list of which services to configure on the
command line after the file.  This will be more useful when I've
implemented more than one.  :-)

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...
* 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).
* 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.

Anyway, have a look and let me know what you think.

-Dom

--+QahgC5+KEYLbs62
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="ispsetup.tar.gz"
Content-Transfer-Encoding: base64

H4sIAHSIyjgAA+1Ze3PiRhLff9Gn6AjOmC0DEg875V2cODbJuhIMZ7OVvYpzsSwG0AGSopHs
5Xx89/v1jATYy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sqfuWzYCtPAN1HPbmVF1QlzXbe/d4QF3qpMT5HIioiJFS
bMfVdSmtC4fdrO/fQ9TKDrWqjPy5yUFrHdMeYWX3Aoylz5niEB0dfRBrc1/EeOoMGdpDLF1r
qTJI3VqgBkK5ldU++iLDTxY3SAIP6p/7xZL7IfMxt9mdh2JXEfwV3J6eX9qMwF/Ertdr+DhW
I8VqfAzrdzVp7Y8whiBECWuODuWhSXg22CX5G2Uq4U3V+qNKYdP79QfD44uvTHr1isON+joM
YkQDzDUFLEVWCmkb+Gjt5SarBusaMFBZTH1zBtyXlYJu9F69goik4xoqAMipN0ZBtLvLBM/O
T6lKdqViGLo0KlLnQWGkKBhcWRVpkKDIQFrMyokHRq0UrxwYuGqPdX9lltSk6rHPg7u0iIiC
ZDJVbpVd3ZJwuN/R1GsfYKhIp7pJ3SraWWZSdx3roj2NhpsyvCTTCCjmUqR0uDbZECLq68YB
OGmVBMnO0YkhpyNHR1Jkm6XUwWLaVK73pX/QJBKq7izJTX35iJGCZiKrOxN/5gd3G8mWJIdu
VUMzx3j4o69ycsghhxxyyCGHHHLIIYcccsghhxxyyCGHHHLIIYcccsghhxxyyCGHHHLIIYcc
csghh/8T+CekeMbFAFAAAA==

--+QahgC5+KEYLbs62--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000311181152.A1206>