Skip to content

Commit

Permalink
Ensure bin dir always exists
Browse files Browse the repository at this point in the history
This is mainly a problem if the /usr partition is read-only and
the bin prefix changes to `/opt/rancher-system-agent`. In any case if we
just always ensure the `bin` directory is created, this should fix #44.

Signed-off-by: Cyrill Troxler <[email protected]>
  • Loading branch information
ctrox committed Aug 27, 2021
1 parent 68d4108 commit 4abf998
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ EOF
}

download_rancher_agent() {
mkdir -p ${CATTLE_AGENT_BIN_PREFIX}
mkdir -p ${CATTLE_AGENT_BIN_PREFIX}/bin
if [ "${CATTLE_AGENT_BINARY_LOCAL}" = "true" ]; then
info "Using local rancher-system-agent binary from ${CATTLE_AGENT_BINARY_LOCAL_LOCATION}"
cp -f "${CATTLE_AGENT_BINARY_LOCAL_LOCATION}" ${CATTLE_AGENT_BIN_PREFIX}/bin/rancher-system-agent
Expand Down

0 comments on commit 4abf998

Please sign in to comment.