diff --git a/xCAT/postscripts/config_chef_client b/xCAT/postscripts/config_chef_client index d159f9043..ac95062d5 100755 --- a/xCAT/postscripts/config_chef_client +++ b/xCAT/postscripts/config_chef_client @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh # IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html @@ -20,8 +20,10 @@ if [ $ARGNUM -gt 1 ]; then fi if [ -z "$chef_server" ]; then - if [ -n "$CFGSERVER" ]; then - chef_server=$CFGSERVER + if [ -n "$CFGSERVER" -a -n "$CFGMGR" ]; then + if [ $CFGMGR = "chef" ]; then + chef_server=$CFGSERVER + fi fi if [ -z "$chef_server" ] then diff --git a/xCAT/postscripts/config_chef_workstation b/xCAT/postscripts/config_chef_workstation index c75b197d8..c17e41cf7 100755 --- a/xCAT/postscripts/config_chef_workstation +++ b/xCAT/postscripts/config_chef_workstation @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh # IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html @@ -24,9 +24,10 @@ fi if [ -z "$chefserver" ] then - if [ -n "$CFGSERVER" ] - then - chefserver=$CFGSERVER + if [ -n "$CFGSERVER" -a -n "$CFGMGR" ]; then + if [ $CFGMGR = "chef" ]; then + chefserver=$CFGSERVER + fi fi if [ -z "$chefserver" ] then diff --git a/xCAT/postscripts/install_chef_client b/xCAT/postscripts/install_chef_client index c340d77c0..69e799e39 100755 --- a/xCAT/postscripts/install_chef_client +++ b/xCAT/postscripts/install_chef_client @@ -52,9 +52,10 @@ fi if [ -z "$chefserver" ] then - if [ -n "$CFGSERVER" ] - then - chefserver=$CFGSERVER + if [ -n "$CFGSERVER" -a -n "$CFGMGR" ]; then + if [ $CFGMGR = "chef" ]; then + chefserver=$CFGSERVER + fi fi if [ -z "$chefserver" ] then diff --git a/xCAT/postscripts/install_chef_workstation b/xCAT/postscripts/install_chef_workstation index 1639610b1..8823ebe19 100755 --- a/xCAT/postscripts/install_chef_workstation +++ b/xCAT/postscripts/install_chef_workstation @@ -53,9 +53,10 @@ fi if [ -z "$chefserver" ] then - if [ -n "$CFGSERVER" ] - then - chefserver=$CFGSERVER + if [ -n "$CFGSERVER" -a -n "$CFGMGR" ]; then + if [ $CFGMGR = "chef" ]; then + chefserver=$CFGSERVER + fi fi if [ -z "$chefserver" ] then diff --git a/xCAT/templates/mypostscript/mypostscript.tmpl b/xCAT/templates/mypostscript/mypostscript.tmpl index 8615698df..05e07433c 100755 --- a/xCAT/templates/mypostscript/mypostscript.tmpl +++ b/xCAT/templates/mypostscript/mypostscript.tmpl @@ -77,6 +77,7 @@ export NTYPE MACADDRESS=#TABLE:mac:$NODE:mac# export MACADDRESS + ## vlan related items. vlan may not be configured. #VLAN_VARS_EXPORT# @@ -114,6 +115,9 @@ export NICCUSTOMSCRIPTS NICNETWORKS=#TABLE:nics:$NODE:nicnetworks# export NICNETWORKS +CFGMGR=#TABLE:cfgmgt:$NODE:cfgmgr# +export CFGMGR + CFGSERVER=#TABLE:cfgmgt:$NODE:cfgserver# export CFGSERVER