Description of problem: IPaddr2 heartbeat resource says "too many arguments" on line 277. Version-Release number of selected component (if applicable): heartbeat-2.0.6 How reproducible: add the IPaddr2 resource to /etc/ha.d/haresources, start heartbeat Steps to Reproduce: 1. include IPaddr2::<virtual IP> to /etc/ha.d/haresources 2. /etc/init.d/heartbeat start 3. observe ;) Actual results: [root@sin ~]# /etc/init.d/heartbeat start Starting High-Availability services: /usr/lib/ocf/resource.d/heartbeat/IPaddr2: line 277: [: too many arguments 2006/07/24_13:04:16 INFO: IPaddr2 Resource is stopped [ OK ] [root@sin ~]# Expected results: [root@sin ~]# /etc/init.d/heartbeat start Starting High-Availability services: 2006/07/24_13:04:16 INFO: IPaddr2 Resource is stopped [ OK ] [root@sin ~]# Additional info: changing line 277 from if [ $SYSTYPE = "Linux" -o $SYSTYPE = "SunOS" ]; then to if [ x$SYSTYPE = x"Linux" -o x$SYSTYPE = x"SunOS" ]; then appears to fix the problem. Perhaps this is due to $SYSTYPE being assigned an empty string, which [] doesn't recognize.
The script you are running needs to be fixed; there is no bash bug here. Either the fix you propose, or quoting the strings (like '[ "$SYSTYPE" = ...') will fix the script.