Make configure-agent-env.service idempotent.

When the configure-agent-env.service service is restarted it will fail
when it tries to create the directory /etc/kubernetes, leaving the
system 'degraded' from systemd's perspective, this change adds the '-p'
flag to mkdir to fail silently if the directory already exists.

Change-Id: I79c3beebd790f2e7c787cf1c34be3c5a26cca2d0
Related-Bug: #1982872
(cherry picked from commit 64570c25b0)
This commit is contained in:
Felipe Reyes 2022-09-13 10:21:30 -03:00
parent 0ffceccac2
commit 02ee44b839
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ storage:
done
/usr/bin/update-ca-trust
mkdir /etc/kubernetes/
mkdir -p /etc/kubernetes/
cp /etc/pki/tls/certs/ca-bundle.crt /etc/kubernetes/ca-bundle.crt
HTTP_PROXY="__HTTP_PROXY__"