diff options
author | Bill Nottingham <notting@redhat.com> | 2001-07-17 20:39:02 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2001-07-17 20:39:02 +0000 |
commit | b0265341c2e47cbda3056570dd5533afdbccd036 (patch) | |
tree | c19c4f280dd3ae399665bc5ba810e68e141d1203 /src | |
parent | 90b0dd7dfdde3332444b55ac6bddef6c550fa80a (diff) | |
download | initscripts-b0265341c2e47cbda3056570dd5533afdbccd036.tar initscripts-b0265341c2e47cbda3056570dd5533afdbccd036.tar.gz initscripts-b0265341c2e47cbda3056570dd5533afdbccd036.tar.bz2 initscripts-b0265341c2e47cbda3056570dd5533afdbccd036.tar.xz initscripts-b0265341c2e47cbda3056570dd5533afdbccd036.zip |
don't allow --event to be used with --cmd/--run (#49203)
Diffstat (limited to 'src')
-rw-r--r-- | src/initlog.1 | 2 | ||||
-rw-r--r-- | src/initlog.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/initlog.1 b/src/initlog.1 index 87eaf8d3..5d50bf90 100644 --- a/src/initlog.1 +++ b/src/initlog.1 @@ -33,7 +33,7 @@ Execute the specified program, logging anything output to stdout or stderr. .TP .I "\-e, \-\-event=[number]" -Logs that the specified event happened. Usually used in conjuction +Logs that the specified event happened. Used in conjuction with \fB\-\-name\fR. Currently specified events are: .nf \fB1\fR the action completed successfully diff --git a/src/initlog.c b/src/initlog.c index 5905e16c..39579eeb 100644 --- a/src/initlog.c +++ b/src/initlog.c @@ -413,6 +413,11 @@ int processArgs(int argc, char **argv, int silent) { fprintf(stderr, _("--name requires one of --event or --string\n")); return -1; } + if (cmdevent && cmd) { + if (!silent) + fprintf(stderr, _("--cmd and --run are incompatible with --event\n")); + return -1; + } if (conffile) { readConfiguration(conffile); } else { |