peng.jianhua created RANGER-1668:
------------------------------------

             Summary: Do some code improvement in setup.sh of security-admin
                 Key: RANGER-1668
                 URL: https://issues.apache.org/jira/browse/RANGER-1668
             Project: Ranger
          Issue Type: Improvement
          Components: Ranger
            Reporter: peng.jianhua
            Assignee: peng.jianhua
            Priority: Minor


ranger_hadoop_conf_file=${WEBAPP_ROOT}/WEB-INF/classes/conf/core-site.xml

the follows '${WEBAPP_ROOT}/WEB-INF/classes/conf/core-site.xml' should be 
changed to '${ranger_hadoop_conf_file}'
{code}
        if [ -d ${WEBAPP_ROOT}/WEB-INF/classes/conf ]; then
                chown -R ${unix_user} ${WEBAPP_ROOT}/WEB-INF/classes/conf
                if [ "${hadoop_conf}" == "" ]
                then
                        log "[WARN] Property hadoop_conf not found. Creating 
blank core-site.xml."
                        echo "<configuration></configuration>" > 
${WEBAPP_ROOT}/WEB-INF/classes/conf/core-site.xml
                else
                        if [ -f ${hadoop_conf_file} ]; then
                                ln -sf ${hadoop_conf_file} 
${WEBAPP_ROOT}/WEB-INF/classes/conf/core-site.xml
                        else
                                log "[WARN] core-site.xml file not found in 
provided hadoop_conf path. Creating blank core-site.xml"
                                echo "<configuration></configuration>" > 
${WEBAPP_ROOT}/WEB-INF/classes/conf/core-site.xml
                        fi
                fi
        fi
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to