ewwhite / zfs-ha

ZFS High-Availability NAS
749 stars 76 forks source link

test: integer expression expected #11

Closed dmaziuk closed 7 years ago

dmaziuk commented 7 years ago

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. ;)

ewwhite commented 7 years ago

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

debug_log () {
    if [ "$DEBUG" == 1 ]; then
        echo "`date`:${OCF_RESKEY_pool}:" $@ >> "$DEBUGLOG"
    fi
}
dmaziuk commented 7 years ago

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