Fix common systemd pitfalls die msg
That change introduces correct way of generating msg for die in common systemd pitfalls. Co-Authored-By: Szymon Datko <szymon.datko@corp.ovh.com> Co-Authored-By: Piotr Bielak <piotr.bielak@corp.ovh.com> Change-Id: I28aebffce6c5561360a9e44c1abc44b709054c30
This commit is contained in:
parent
02ca8da102
commit
4e16c3dd5f
@ -1439,7 +1439,7 @@ function _common_systemd_pitfalls {
|
|||||||
# do some sanity checks on $cmd to see things we don't expect to work
|
# do some sanity checks on $cmd to see things we don't expect to work
|
||||||
|
|
||||||
if [[ "$cmd" =~ "sudo" ]]; then
|
if [[ "$cmd" =~ "sudo" ]]; then
|
||||||
local msg=<<EOF
|
read -r -d '' msg << EOF || true # read returns 1 for EOF, but it is ok here
|
||||||
You are trying to use run_process with sudo, this is not going to work under systemd.
|
You are trying to use run_process with sudo, this is not going to work under systemd.
|
||||||
|
|
||||||
If you need to run a service as a user other than $STACK_USER call it with:
|
If you need to run a service as a user other than $STACK_USER call it with:
|
||||||
@ -1450,7 +1450,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! "$cmd" =~ ^/ ]]; then
|
if [[ ! "$cmd" =~ ^/ ]]; then
|
||||||
local msg=<<EOF
|
read -r -d '' msg << EOF || true # read returns 1 for EOF, but it is ok here
|
||||||
The cmd="$cmd" does not start with an absolute path. It will fail to
|
The cmd="$cmd" does not start with an absolute path. It will fail to
|
||||||
start under systemd.
|
start under systemd.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user