diff options
Diffstat (limited to 'mcp')
-rw-r--r-- | mcp/scripts/lib.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh index 3ec596a48..964f80fde 100644 --- a/mcp/scripts/lib.sh +++ b/mcp/scripts/lib.sh @@ -3,8 +3,10 @@ # generate_ssh_key() { + local user=${SUDO_USER:-$USER} + [ -f "$SSH_KEY" ] || ssh-keygen -f ${SSH_KEY} -N '' - install -o $USER -m 0600 ${SSH_KEY} /tmp/ + install -o $user -m 0600 ${SSH_KEY} /tmp/ } get_base_image() { |