From 0a4c7179c405a3af3211078af72ef6a956409970 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Tue, 24 Feb 2015 11:02:48 -0500 Subject: [PATCH] Introduced a bug on earlier commit ec9658105909d7d91ad10d60495840a348fe6fef On the checks for pkglist, otherpkglist and postinstall_files, should make sure the variable is not empty string before seeing if the file exists --- xCAT-server/lib/xcat/plugins/genimage.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/genimage.pm b/xCAT-server/lib/xcat/plugins/genimage.pm index e3959b1c5..f2558f16c 100644 --- a/xCAT-server/lib/xcat/plugins/genimage.pm +++ b/xCAT-server/lib/xcat/plugins/genimage.pm @@ -168,7 +168,7 @@ sub process_request { return 1; } $pkglist = $ref_linuximage_tab->{'pkglist'}; - if (! -e $pkglist) { + if ($pkglist ne "" and ! -e $pkglist) { $callback->({error=>["The pkglist specified \'$pkglist\' does not exist!"],errorcode=>[1]}); return 1; } @@ -177,12 +177,12 @@ sub process_request { $srcdir_otherpkgs = $ref_linuximage_tab->{'otherpkgdir'}; $otherpkglist = $ref_linuximage_tab->{'otherpkglist'}; - if (! -e $otherpkglist) { + if ($otherpkglist ne "" and ! -e $otherpkglist) { $callback->({error=>["The otherpkglist specified \'$otherpkglist\' does not exist!"],errorcode=>[1]}); return 1; } $postinstall_filename = $ref_linuximage_tab->{'postinstall'}; - if (! -e $postinstall_filename) { + if ($postinstall_filename ne "" and ! -e $postinstall_filename) { $callback->({error=>["The postinstall_filename specified \'$postinstall_filename\' does not exist!"],errorcode=>[1]}); return 1; }