Updated Branches: refs/heads/trunk 607d7d4a2 -> 896165e49
AMBARI-2667. keytab generation file needs to be updated based on the new csv. (srimanth) Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/896165e4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/896165e4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/896165e4 Branch: refs/heads/trunk Commit: 896165e49cc226ad1d0aea6f718d19801bab72fd Parents: 607d7d4 Author: Srimanth Gunturi <[email protected]> Authored: Tue Jul 16 19:55:46 2013 -0700 Committer: Srimanth Gunturi <[email protected]> Committed: Tue Jul 16 19:55:46 2013 -0700 ---------------------------------------------------------------------- ambari-server/src/main/resources/scripts/keytabs.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/896165e4/ambari-server/src/main/resources/scripts/keytabs.sh ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/scripts/keytabs.sh b/ambari-server/src/main/resources/scripts/keytabs.sh index ee7aecb..2e186e0 100755 --- a/ambari-server/src/main/resources/scripts/keytabs.sh +++ b/ambari-server/src/main/resources/scripts/keytabs.sh @@ -66,9 +66,10 @@ processCSVFile () { service=`echo $line|cut -d , -f 2`; principal=`echo $line|cut -d , -f 3`; keytabFile=`echo $line|cut -d , -f 4`; - owner=`echo $line|cut -d , -f 5`; - group=`echo $line|cut -d , -f 6`; - acl=`echo $line|cut -d , -f 7`; + keytabFilePath=`echo $line|cut -d , -f 5`; + owner=`echo $line|cut -d , -f 6`; + group=`echo $line|cut -d , -f 7`; + acl=`echo $line|cut -d , -f 8`; if [[ $seenHosts != *$hostName* ]]; then echo "mkdir -p ./keytabs_$hostName" >> commands.mkdir; @@ -86,8 +87,8 @@ processCSVFile () { seenPrincipals="$seenPrincipals$principal" fi - tmpKeytabFile=${keytabFile/\/etc\/security\/keytabs/`pwd`/tmp_keytabs} - newKeytabFile=${keytabFile/\/etc\/security\/keytabs/`pwd`/keytabs_$hostName} + tmpKeytabFile=${keytabFilePath/\/etc\/security\/keytabs/`pwd`/tmp_keytabs} + newKeytabFile=${keytabFilePath/\/etc\/security\/keytabs/`pwd`/keytabs_$hostName} if [ ! -f $tmpKeytabFile ]; then echo "kadmin.local -q \"xst -k $tmpKeytabFile $principal\"" >> commands.xst; fi
