I can't tell exactly what you are trying to accomplish, but if you are
looking for some way to populate a config file or something with local
IPs you might be able to get some ideas from:
/etc/e-smith/templates/etc/dhcpd.conf/70PPTPDEntries
That template has to create IP entries (and not the gateway) for PPTPD
and should give you ideas as to how to do whatever it is you want to do.
I should note, it is not as simple as you might think it is, which is
probably why it is not simply in the configuration db. It is real
simple if you have a 192.168.1.z class C style network. It gets
considerably more complicated if you have a Class B (like 172.16.y.z) or
a class A (10.x.y.z) as you need to deal with the quirks of IP
addressing and binary to "human readable" dotted octet addresses. The
code in the template above deals with all of the above nicely if you are
pulling it out of recent builds. There was a bug in past builds (prior
to 5.1 I think) that built IPs using a fairly wierd addressing structure
that broke some things. Bottom line, be careful and be sure to test
your implementation with 172.16.y.z (subnet 255.255.0.0) local
addresses.
Hope this helps,
JP
On Wed, 2002-05-01 at 12:47, [EMAIL PROTECTED] wrote:
> Just a thought...
>
> If you set up {$LocalIP} as a variable in a template fragment, it pulls
> 192.168.1.1 (or whatever IP address is assigned to eth0)...
>
> Would you use {$LocalDomainPrefix}.0 to get 192.168.1.0 when the template was
> expanded?
>
> If so, why is there no entry for it in /home/e-smith/configuration?
>
> Here is an exceprt from the file:
>
> LocalDomainPrefix=
> LocalIP=192.168.1.1
> LocalNetmask=255.255.255.0
>
>
> --
> Please report bugs to [EMAIL PROTECTED]
> Please mail [EMAIL PROTECTED] (only) to discuss security issues
> Support for registered customers and partners to [EMAIL PROTECTED]
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> Archives by mail and http://www.mail-archive.com/devinfo%40lists.e-smith.org
>
>
--
Please report bugs to [EMAIL PROTECTED]
Please mail [EMAIL PROTECTED] (only) to discuss security issues
Support for registered customers and partners to [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Archives by mail and http://www.mail-archive.com/devinfo%40lists.e-smith.org