diff --git a/xCAT-server/share/xcat/scripts/configonie b/xCAT-server/share/xcat/scripts/configonie index 35fe32d5d..64a78c942 100755 --- a/xCAT-server/share/xcat/scripts/configonie +++ b/xCAT-server/share/xcat/scripts/configonie @@ -153,6 +153,7 @@ sub config_ssh { print "$switch is not reachable\n"; next; } + my ($exp, $errstr) = cumulus_connect($ssh_ip, $userid, $password, $timeout); if (!defined $exp) { @@ -290,6 +291,9 @@ sub install_license { xCAT::MsgUtils->message("E","Failed to $cmd to $switch"); next; } + #restart switchd and reload interface + $cmd = "xdsh $switch 'systemctl enable switchd;systemctl restart switchd;ifreload -a' "; + xCAT::Utils->runcmd($cmd, 0); push (@config_switches, $switch); } if (@config_switches) { @@ -397,8 +401,8 @@ sub config_ntp { xCAT::MsgUtils->message("E","xdsh command to $switch failed"); next; } - my $cmd_line = "echo $timezone >/etc/timezone;dpkg-reconfigure --frontend noninteractive tzdata"; - $cmd = "xdsh $switch $cmd_line"; + $cmd = "xdsh $switch 'echo $timezone >/etc/timezone;dpkg-reconfigure --frontend noninteractive tzdata' "; + $rc= xCAT::Utils->runcmd($cmd, 0); if ($::RUNCMD_RC != 0) { print "Failed to update ntp timezone\n"; xCAT::MsgUtils->message("E","Failed to update ntp timezone for $switch"); diff --git a/xCAT/postscripts/configinterface b/xCAT/postscripts/configinterface index 9c248b2e4..4c99ec2aa 100755 --- a/xCAT/postscripts/configinterface +++ b/xCAT/postscripts/configinterface @@ -61,8 +61,9 @@ if [ ! -f $xcat_intf ]; then fi # license needs to set before start switchd -if [ ! -e /etc/cumulus/.license* ]; then - echo "ERROR: cumulus license file does not exist"; +/usr/cumulus/bin/cl-license 2>/dev/null +if [ $? -ne 0 ]; then + echo "ERROR: cumulus license does not exist"; exit 1; fi