Skip to content

Commit c2212f0

Browse files
committed
Enforce PATH variable for agent_upgrade.sh
Many of the tasks/plans shipped in PE are brittle and make assumptions about environment variables. By enforcing PATH (and HOME, and USER) in agent_upgrade.sh we hopefully insulate ourselves from the worst of it.
1 parent 3acc772 commit c2212f0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎tasks/agent_upgrade.sh‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
22

3+
export USER=$(id -un)
4+
export HOME=$(getent passwd "$USER" | cut -d : -f 6)
5+
export PATH="/opt/puppetlabs/bin:${PATH}"
6+
37
set -e
48

59
curl -k "https://${PT_server}:8140/packages/current/upgrade.bash" | bash

0 commit comments

Comments
 (0)