Fix: ocf_exit_reason: implicit format string "%s" for single argument version
Also, don't use the $msg as format string, but via "%s%s" "$cookie" "$msg".
Or, depending on presence of % sequences in $msg,
you'd get different output on stderr and via ha_log.
Without the patch:
( OCF_ROOT=$PWD dash -c '. heartbeat/ocf-shellfuncs.in ; ocf_exit_reason "0.x% Bugs less"' )
dash: 372: printf: % B: invalid directive
ocf-exit-reason:0.x
( OCF_ROOT=$PWD dash -c '. heartbeat/ocf-shellfuncs.in ; ocf_exit_reason "0.x% bugs less"' )
ocf-exit-reason:0.xugs less
With this patch:
( OCF_ROOT=$PWD dash -c '. heartbeat/ocf-shellfuncs.in ; ocf_exit_reason "0.x% Bugs less"' )
ocf-exit-reason:0.x% Bugs less
( OCF_ROOT=$PWD dash -c '. heartbeat/ocf-shellfuncs.in ; ocf_exit_reason "0.x% bugs less"' )
ocf-exit-reason:0.x% bugs less