From 15db7e09b029d16b3d2542a07b87d6c20650be96 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 27 Sep 2017 16:29:36 -0400 Subject: [PATCH] Honor disablenodesetwarning in packimage --- xCAT-server/lib/xcat/plugins/packimage.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/packimage.pm b/xCAT-server/lib/xcat/plugins/packimage.pm index fa450e7c9..7e7d85990 100755 --- a/xCAT-server/lib/xcat/plugins/packimage.pm +++ b/xCAT-server/lib/xcat/plugins/packimage.pm @@ -113,8 +113,13 @@ sub process_request { "version|v" => \$version ); if ($arch or $osver or $profile) { - $callback->({ error => ["-o, -p and -a options are obsoleted, please use 'packimage ' instead."], errorcode => [1] }); - return 1; + my @ents = xCAT::TableUtils->get_site_attribute("disablenodesetwarning"); + my $site_ent = $ents[0]; + if (!defined($site_ent) || ($site_ent =~ /no/i) || ($site_ent =~ /0/)) { + + $callback->({ error => ["-o, -p and -a options are obsoleted, please use 'packimage ' instead."], errorcode => [1] }); + return 1; + } } if ($version) { my $version = xCAT::Utils->Version();