Network::Interfaces3pm
Interfaces networking module
Usage
my $networking = new Network::Interfaces(%vars);
if($networking->footprint()) {$networking->setup();}
my @fileschanged = $networking->files();
Overview
Methods
The following methods exist in this module:
- footprint()
-
This method returns 1 if Interfaces style networking was discovered on the machine, undef if it was not. The current test checks for the existance of the file
$root/etc/network/interfaces.
- setup()
-
The setup() method sets up the file /$root/etc/network/interfaces for Interfaces type networking. It iterates through all the network interfaces specified in the configuration file (and/or STDIN) and translates them into the format understood by
ifupandifdownbinaries. It also sets the hostname with the one provided, by modifying the /etc/hostname file.
- setup_interface() setup_interface() method determines which network setup method will be used for the particular interface. Currently Interfaces supports 3 types; static, dhcp, and bootp. For more information read the man page for interfaces.