diff --git a/aii-core/src/main/perl/Shellfe.pm b/aii-core/src/main/perl/Shellfe.pm index 5ea1d18c..61cc04ab 100755 --- a/aii-core/src/main/perl/Shellfe.pm +++ b/aii-core/src/main/perl/Shellfe.pm @@ -580,6 +580,22 @@ sub run_plugin $plug->set_active_config($st->{configuration}); } + my @params; + if ($modulename eq "dhcp") { + if ($self->option("rescue") && $method eq CONFIGURE){ + $self->debug (4, "Setting params for DHCP plugin and rescue mode"); + @params = ($st->{configuration}, "rescue"); + } + else { + $self->debug (4, "Setting params for DHCP plugin and non-rescue mode"); + @params = ($st->{configuration}, "none"); + } + } + else { + $self->debug (4, "Setting generic params"); + @params = ($st->{configuration}); + } + # The plugin method has to return success my $res = eval { $plug->$method ($st->{configuration}) }; if ($@) { diff --git a/aii-dhcp/src/main/perl/dhcp.pm b/aii-dhcp/src/main/perl/dhcp.pm index f9918496..a624de1d 100644 --- a/aii-dhcp/src/main/perl/dhcp.pm +++ b/aii-dhcp/src/main/perl/dhcp.pm @@ -340,10 +340,16 @@ sub Configure if ($opts->{tftpserver}) { $tftpserver = $opts->{tftpserver}; } + if ($opts->{filename}) { $filename = $opts->{filename}; $filename =~ s/BOOTSRVIP/$server_ip/; } + + if ($opts->{rescue}) { + $filename = $opts->{rescue}; + } + if ($opts->{options}) { foreach my $k (sort keys %{$opts->{options}}) { $additional .= "option $k $opts->{options}->{$k};\n";