Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP7:GA
pacemaker.12462
pacemaker-tools-bash-portability-issue-in-crm_f...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pacemaker-tools-bash-portability-issue-in-crm_failcount.patch of Package pacemaker.12462
commit 4ab4b5769598ff18982254d509b99c088b0bc8b7 Author: Ken Gaillot <kgaillot@redhat.com> Date: Thu May 10 11:59:00 2018 -0500 Low: tools: bash portability issue in crm_failcount Apparently not all versions of bash allow a trailing | in a match pattern to specify "nothing", e.g. (s|sec|) diff --git a/tools/crm_failcount.in b/tools/crm_failcount.in index c1c61b4ad..85a6761b4 100755 --- a/tools/crm_failcount.in +++ b/tools/crm_failcount.in @@ -51,7 +51,10 @@ parse_interval() { INT_8601RE="^P(([0-9]+)Y)?(([0-9]+)M)?(([0-9]+)D)?T?(([0-9]+)H)?(([0-9]+)M)?(([0-9]+)S)?$" - if [[ $INT_S =~ $(interval_re "s|sec|") ]]; then + if [[ $INT_S =~ $(interval_re "") ]]; then + echo $(( ${BASH_REMATCH[1]} * 1000 )) + + elif [[ $INT_S =~ $(interval_re "s|sec") ]]; then echo $(( ${BASH_REMATCH[1]} * 1000 )) elif [[ $INT_S =~ $(interval_re "ms|msec") ]]; then
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor