From 7289c16eed6749f96dfe4405a1ad48caad1f7116 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Thu, 11 Mar 2010 17:15:29 +0100 Subject: [PATCH] daemon-util: Require dashes in commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Even though the script uses underscores (_) internally, the external commands are supposed to be written using dashes (-). Signed-off-by: Michael Hanselmann <hansmi@google.com> Reviewed-by: RenΓ© Nussbaumer <rn@google.com> --- daemons/daemon-util.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/daemons/daemon-util.in b/daemons/daemon-util.in index b8f6f2bfa..26c650a7e 100755 --- a/daemons/daemon-util.in +++ b/daemons/daemon-util.in @@ -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//-/_} -- GitLab