Skip to content
Snippets Groups Projects
Commit 7289c16e authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

daemon-util: Require dashes in commands


Even though the script uses underscores (_) internally, the external
commands are supposed to be written using dashes (-).

Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent dd999b06
No related branches found
No related tags found
No related merge requests found
......@@ -116,6 +116,11 @@ fi
orig_action=$1; shift
if [[ "$orig_action" == *_* ]]; then
echo "Command must not contain underscores" >&2
exit 1
fi
# Replace all dashes (-) with underlines (_)
action=${orig_action//-/_}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment