There's no good reason to use `--wait` with ReloadOrRestartUnit, or
TryRestartUnit.
The message was also wrong in another sense. 'systemctl isolate'
starts units, but it did not support `--wait`. Although it's
unlikely anyone would want to do that in the first place.
char **name;
int r = 0;
- if (arg_wait && !strstr(argv[0], "start")) {
- log_error("--wait may only be used with a command that starts units.");
+ if (arg_wait && !STR_IN_SET(argv[0], "start", "restart")) {
+ log_error("--wait may only be used with the 'start' or 'restart' commands.");
return -EINVAL;
}