Fix the usage of rc_usage. The rc_usage function takes
a list of possible keywords, not all them in a single argument. This also fixes the issue of extra delimiter characters appearing on the help line from rc.d scripts not setting $extra_commands.
This commit is contained in:
parent
114d09d8b8
commit
85a65c57e3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=150796
@ -515,7 +515,7 @@ run_rc_command()
|
||||
fi
|
||||
|
||||
if [ -z "$rc_arg" ]; then
|
||||
rc_usage "$_keywords"
|
||||
rc_usage $_keywords
|
||||
fi
|
||||
|
||||
if [ -n "$flags" ]; then # allow override from environment
|
||||
@ -797,7 +797,7 @@ $command $rc_flags $command_args"
|
||||
;;
|
||||
|
||||
*)
|
||||
rc_usage "$_keywords"
|
||||
rc_usage $_keywords
|
||||
;;
|
||||
|
||||
esac
|
||||
@ -805,7 +805,7 @@ $command $rc_flags $command_args"
|
||||
done
|
||||
|
||||
echo 1>&2 "$0: unknown directive '$rc_arg'."
|
||||
rc_usage "$_keywords"
|
||||
rc_usage $_keywords
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user