From 656469da5c07b6392ac7d516e5f94a51f229c874 Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 9 Apr 2014 11:14:43 -0400 Subject: [PATCH] defect 4053 --- xCAT-server/lib/xcat/plugins/zone.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/zone.pm b/xCAT-server/lib/xcat/plugins/zone.pm index 1e7740e88..0ccfbffc2 100644 --- a/xCAT-server/lib/xcat/plugins/zone.pm +++ b/xCAT-server/lib/xcat/plugins/zone.pm @@ -735,6 +735,9 @@ sub addtozonetable my $curdefaultzone = xCAT::Zone->getdefaultzone($callback); if (!(defined ($curdefaultzone))) { # no default defined $tb_cols{defaultzone} ="yes"; + $tab->setAttribs({zonename => $zonename}, \%tb_cols); + $tab->commit(); + $tab->close(); } else { # already a default if ($$options{'force'}) { # force the default $tb_cols{defaultzone} ="yes"; @@ -810,6 +813,9 @@ sub updatezonetable my $curdefaultzone = xCAT::Zone->getdefaultzone($callback); if (!(defined ($curdefaultzone))) { # no default defined $tb_cols{defaultzone} ="yes"; + $tab->setAttribs({zonename => $zonename}, \%tb_cols); + $tab->commit(); + $tab->close(); } else { # already a default if ($$options{'force'}) { # force the default $tb_cols{defaultzone} ="yes";