From f9c1bd930edaa1746fbb0afb08baf5abb29acdcd Mon Sep 17 00:00:00 2001 From: daniceexi Date: Wed, 25 Sep 2013 01:49:56 -0400 Subject: [PATCH] defect 3779: change the output of driver injection to make it sensible --- xCAT-server/lib/xcat/plugins/anaconda.pm | 4 +++- xCAT-server/lib/xcat/plugins/sles.pm | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) 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);