minor fix to method of finding home as previous could 'overmatch'

This commit is contained in:
Brian Coca 2015-03-30 22:11:17 -04:00 committed by Matt Clay
parent bb418095a3
commit 0a30663a1e

View file

@ -398,7 +398,7 @@ LXC_ANSIBLE_STATES = {
# home directory of the user that was attached to the container and source
# that users environment variables by default.
ATTACH_TEMPLATE = """#!/usr/bin/env bash
pushd "$(grep $(whoami) /etc/passwd | awk -F':' '{print $6}')"
pushd "$(getent passwd $(whoami)|cut -f6 -d':')"
if [[ -f ".bashrc" ]];then
source .bashrc
fi