From ee7fbcf418a77cb8d840d8ed9c567b179212be4a Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 30 Mar 2015 22:11:17 -0400 Subject: [PATCH] minor fix to method of finding home as previous could 'overmatch' --- cloud/lxc/lxc_container.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud/lxc/lxc_container.py b/cloud/lxc/lxc_container.py index 1ae67bf23c6..8c708dc31cd 100644 --- a/cloud/lxc/lxc_container.py +++ b/cloud/lxc/lxc_container.py @@ -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