[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: (hopefully perl) API to /etc/network/interfaces?



Douglas A. Tutty <dtutty@porchlight.ca> wrote:
> On Fri, Apr 11, 2008 at 07:36:56PM -0700, Tyler MacDonald wrote:
> > 	I know that reading /etc/network/interfaces has been done over and
> > over... has an API been created for editing/writing it? If it's available in
> > perl, or over the commandline, that would be even better :-)
> 
> Its just a plain text file.  Use an editor to edit it.
> 
> What is it you are trying to do?

  Whenever I order a new server, my ISP puts all of my additional IPs into
the interfaces file (as they generally should). I use these IPs to deploy
xen virtual machines, so I do not want them brought up by the physical
machine. Also, my xen deployments are configured through a YAML file. I'd
like to read the interfaces file, add the IPs to my YAML file on the
management server, and then remove them from the interfaces file.

  Yes this could be scripted, I was just wondering if there was an official
API that things like the "System -> Administration -> Network" applet uses
that I could also use.

	- Tyler


Reply to: