Merge pull request #128 from kinvolk/flatcar-scripts

jenkins/systemd-run-wrap.sh: randomize unit name suffix
This commit is contained in:
Kai Lüke 2021-07-14 13:46:43 +02:00
commit 05b267f25a

View File

@ -15,7 +15,7 @@ for VARNAME in $(sh -c 'compgen -v'); do
ARGS+=("--setenv" "${VARNAME}=${VAL}")
done
UNITNAME="run-$(date '+%s')"
UNITNAME="run-$(date '+%s')-${RANDOM}"
# The --pipe option does not stop the unit when the systemd-run process is killed, we have to do this through a trap
# (and --pty as alternative doesn't behave well because it leads to processes expecting stdin when there is none)