[GH-ISSUE #11] test: integer expression expected #10

Closed
opened 2026-05-05 03:28:27 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @dmaziuk on GitHub (Jul 27, 2017).
Original GitHub issue: https://github.com/ewwhite/zfs-ha/issues/11

Failover message:

resource-zfs_stop_0:14810:stderr [ /usr/lib/ocf/resource.d/heartbeat/ZFS: line 35: [: : integer expression expected ]

Seems to be cosmetic, failover works fine, so I haven't looked it yet. Will post an update if/when I get a round tuit. ;)

Originally created by @dmaziuk on GitHub (Jul 27, 2017). Original GitHub issue: https://github.com/ewwhite/zfs-ha/issues/11 Failover message: `resource-zfs_stop_0:14810:stderr [ /usr/lib/ocf/resource.d/heartbeat/ZFS: line 35: [: : integer expression expected ]` Seems to be cosmetic, failover works fine, so I haven't looked it yet. Will post an update if/when I get a round tuit. ;)
Author
Owner

@ewwhite commented on GitHub (Aug 3, 2017):

Oh, easy fix... Use == instead of eq on line 35.

debug_log () {
    if [ "$DEBUG" == 1 ]; then
        echo "`date`:${OCF_RESKEY_pool}:" $@ >> "$DEBUGLOG"
    fi
}
<!-- gh-comment-id:319957693 --> @ewwhite commented on GitHub (Aug 3, 2017): Oh, easy fix... Use `==` instead of `eq` on line 35. ``` debug_log () { if [ "$DEBUG" == 1 ]; then echo "`date`:${OCF_RESKEY_pool}:" $@ >> "$DEBUGLOG" fi } ```
Author
Owner

@dmaziuk commented on GitHub (Aug 4, 2017):

Thanks, I just got back from vacation and have a backlog of stuff to do, so haven't had time to look myself. Now that you mention it, == is actually a bashism, it should be = for /bin/test (which bash will apparently accept as well as ==)
;)
thanks again

<!-- gh-comment-id:320341044 --> @dmaziuk commented on GitHub (Aug 4, 2017): Thanks, I just got back from vacation and have a backlog of stuff to do, so haven't had time to look myself. Now that you mention it, `==` is actually a bashism, it should be `=` for `/bin/test` (which bash will apparently accept as well as `==`) ;) thanks again
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/zfs-ha#10
No description provided.