Github user shivzone commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/1294#discussion_r142799681 --- Diff: pxf/pxf-service/src/scripts/pxf-env.sh --- @@ -33,8 +33,19 @@ export PXF_LOGDIR=@pxfLogDir@ # Path to Run directory export PXF_RUNDIR=@pxfRunDir@ + +if [ ! -z '@pxfDefaultUser@' ]; then + allow_custom_pxf_user=true +else + allow_custom_pxf_user=false +fi + # Configured user -export PXF_USER=${PXF_USER:-@pxfDefaultUser@} +if [ $allow_custom_pxf_user ]; then + export PXF_USER=${PXF_USER:-@pxfDefaultUser@} +else + export PXF_USER=${USER} --- End diff -- I don't think there is any value in setting a default value for PXF_USER variable if there is no specific configured user. We can do away with allow_custom_pxf_user and simply set PXF_USER if if [ ! -z '@pxfDefaultUser@' ]
---