diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2008-06-26 16:34:42 +0000 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2008-06-26 16:34:42 +0000 |
commit | d58ea68e07ac987e642947ceabe3dd87ecdb22ad (patch) | |
tree | 17f6587ac5a7d045dd7473adee2a53b8edb565e3 /scripts/VyattaConfig.pm | |
parent | 3f41fcca673762ff27328192036719eace6b6495 (diff) | |
download | vyatta-cfg-d58ea68e07ac987e642947ceabe3dd87ecdb22ad.tar.gz vyatta-cfg-d58ea68e07ac987e642947ceabe3dd87ecdb22ad.zip |
=> Modified VyattaConfig.pm function 'returnOrigValues()' to return empty array when no value is configured
=> Modified VyattaConfigLoad.pm to give a higher ranking to 'system host-name' than 'interface' so that during boot-up
if host is using dhcp client to get an ip for an interface, it can send the host-name if configured
=> Modified vyatta-interfaces.pl:
1. to request only for dhcp options 'subnet-nask', 'broadcast address', 'routers', 'domain-name-servers'
when an interface is configured to get an ip using dhcp.
2. ask for a domain-name only if domain-name is not configured in our CLI
3. do not request dhcp options: 'time-offset', 'interface-mtu' and 'host-name' that were being requested before
4. Update /etc/resolv.conf to remove domain-name and name-server options received from dhcp server for the
particular interface that releases dhcp lease either from op-mode or cfg-mode
Diffstat (limited to 'scripts/VyattaConfig.pm')
-rwxr-xr-x | scripts/VyattaConfig.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/VyattaConfig.pm b/scripts/VyattaConfig.pm index 941bb63..9ddc8ef 100755 --- a/scripts/VyattaConfig.pm +++ b/scripts/VyattaConfig.pm @@ -262,7 +262,10 @@ sub returnValues { # node is relative sub returnOrigValues { my $val = returnOrigValue(@_); - my @values = split("\n", $val); + my @values = (); + if (defined($val)) { + @values = split("\n", $val); + } return @values; } |