Commit da8d33b5 authored by Kirk Webb's avatar Kirk Webb

Add Linux clientside support for user-defined IP aliases.

parent be88e401
......@@ -112,6 +112,7 @@ my $USERDEL = "/usr/sbin/userdel";
my $USERMOD = "/usr/sbin/usermod";
my $GROUPADD = "/usr/sbin/groupadd";
my $GROUPDEL = "/usr/sbin/groupdel";
my $IPBIN = "/sbin/ip";
my $IFCONFIGBIN = "/sbin/ifconfig";
my $IFCONFIG = "$IFCONFIGBIN %s inet %s netmask %s";
my $VLANCONFIG = "/sbin/vconfig";
......@@ -428,6 +429,15 @@ sub os_ifconfig_line($$$$$$$$;$$$)
return ($uplines, $downlines);
# Simple setup for IP aliases.
if ($iface_type eq "alias") {
$uplines = "$IPBIN addr add $inet/$mask dev $iface";
$downlines = "$IPBIN addr del $inet/$mask dev $iface";
return ($uplines, $downlines);
# Special handling for new style interfaces (which have settings).
# This should all move into per-type modules at some point.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment