Skip to content
Commit 8deae90e authored by Aaron Plattner's avatar Aaron Plattner Committed by Zbigniew Jędrzejewski-Szmek
Browse files

core: Fix -EOPNOTSUPP emergency action error string

The error string for operations that are not supported (e.g. "shutdown" for
user-defined units) should take two arguments, where the first one is the type
of action being defined (i.e. "FailureAction" vs. "SuccessAction") and the
second is the string that was invalid.

Currently, the code prints this:

 $ systemd-run --user --wait -p SuccessAction=poweroff true
 Failed to start transient service unit: EmergencyAction setting invalid for manager type: SuccessAction

Change the format string to instead print:

 $ systemd-run --user --wait -p SuccessAction=poweroff true
 Failed to start transient service unit: SuccessAction setting invalid for manager type: poweroff

(cherry picked from commit 119f0f28)
parent 6d1e85d2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment