[anaconda][rhel7-branch][v2][PATCH] Fix environment handling