From adc81c0cbba6fc8776882e24fd113d67e7f3fe67 Mon Sep 17 00:00:00 2001 From: Matt Ezell Date: Mon, 21 Aug 2017 23:06:23 -0400 Subject: [PATCH] Install the cumulus license from cumulusztp (#3731) --- xCAT/postscripts/cumulusztp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xCAT/postscripts/cumulusztp b/xCAT/postscripts/cumulusztp index d1403edeb..6fdc7a537 100755 --- a/xCAT/postscripts/cumulusztp +++ b/xCAT/postscripts/cumulusztp @@ -114,6 +114,20 @@ else logger -s -t "xcat.cumulusztp" -p local4.info "SNMP enabled!" fi +#install license, if needed +cl-license > /dev/null 2>&1 +rc=$? +if [ "$rc" != "0" ];then + if cl-license -i http://$server_ip/install/custom/sw_os/cumulus/licensefile.txt; then + logger -s -t "xcat.cumulusztp" -p local4.info "installed Cumulus license" + systemctl enable switchd + systemctl start switchd + else + logger -s -t "xcat.cumulusztp" -p local4.err "failed to install Cumulus license" + echo "failed to install Cumulus license" + fi +fi + #config base interface ./configinterface rc=$?