{"comment":{"url":"https://api.github.com/repos/zfsonlinux/zfs/comments/11270659","html_url":"https://github.com/zfsonlinux/zfs/commit/ed2cd8e14fa8400de4d2971054bf7cbc4087a357#commitcomment-11270659","id":11270659,"user":{"login":"dun","id":505919,"avatar_url":"https://avatars.githubusercontent.com/u/505919?v=3","gravatar_id":"","url":"https://api.github.com/users/dun","html_url":"https://github.com/dun","followers_url":"https://api.github.com/users/dun/followers","following_url":"https://api.github.com/users/dun/following{/other_user}","gists_url":"https://api.github.com/users/dun/gists{/gist_id}","starred_url":"https://api.github.com/users/dun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dun/subscriptions","organizations_url":"https://api.github.com/users/dun/orgs","repos_url":"https://api.github.com/users/dun/repos","events_url":"https://api.github.com/users/dun/events{/privacy}","received_events_url":"https://api.github.com/users/dun/received_events","type":"User","site_admin":false},"position":45,"line":45,"path":"etc/init.d/zfs-import.in","commit_id":"ed2cd8e14fa8400de4d2971054bf7cbc4087a357","created_at":"2015-05-19T20:32:19Z","updated_at":"2015-05-19T20:32:19Z","body":"Why not use:\r\n```\r\nif [ -z \"$available_pools\" -a \"$USE_DISK_BY_ID\" = 'yes' ]\r\n```\r\n\r\nIf `USE_DISK_BY_ID` is set to `yes` then it must also be a non-zero length string.\r\n\r\nAlso, using `==` within a `[` (a.k.a. `test`) command is a bashism. The `=` operator should be used to test for string equality."}}