Skip to content

Commit f292fb2

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Fix common systemd pitfalls die msg"
2 parents 52514d3 + 4e16c3d commit f292fb2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

functions-common

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,7 @@ function _common_systemd_pitfalls {
14391439
# do some sanity checks on $cmd to see things we don't expect to work
14401440

14411441
if [[ "$cmd" =~ "sudo" ]]; then
1442-
local msg=<<EOF
1442+
read -r -d '' msg << EOF || true # read returns 1 for EOF, but it is ok here
14431443
You are trying to use run_process with sudo, this is not going to work under systemd.
14441444
14451445
If you need to run a service as a user other than $STACK_USER call it with:
@@ -1450,7 +1450,7 @@ EOF
14501450
fi
14511451

14521452
if [[ ! "$cmd" =~ ^/ ]]; then
1453-
local msg=<<EOF
1453+
read -r -d '' msg << EOF || true # read returns 1 for EOF, but it is ok here
14541454
The cmd="$cmd" does not start with an absolute path. It will fail to
14551455
start under systemd.
14561456

0 commit comments

Comments
 (0)