diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index afa0eca09..97096710d 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -3143,10 +3143,12 @@ sub insert_dd { @rpm_drivers = keys %dnhash; if (@rpm_list) { - if (@driver_list) { + if (@rpm_drivers) { push @{$rsp->{data}}, "The drivers:".join(',', sort(@rpm_drivers))." from ".join(',', sort(@rpm_list))." have been injected to initrd."; } elsif ($Injectalldriver) { push @{$rsp->{data}}, "All the drivers from :".join(',', sort(@rpm_list))." have been injected to initrd."; + } else { + push @{$rsp->{data}}, "No driver was injected to initrd."; } } diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index 0bcdfb310..f9a660289 100644 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -2298,10 +2298,10 @@ sub insert_dd () { @rpm_drivers = keys %dnhash; if (@rpm_list) { - if (@driver_list) { + if (@rpm_drivers) { push @{$rsp->{data}}, "The drivers:".join(',', sort(@rpm_drivers))." from ".join(',', sort(@rpm_list))." have been injected to initrd."; - } elsif ($Injectalldriver) { - push @{$rsp->{data}}, "All the drivers from :".join(',', sort(@rpm_list))." have been injected to initrd."; + } else { + push @{$rsp->{data}}, "No driver was injected to initrd."; } } xCAT::MsgUtils->message("I", $rsp, $callback);