Right, that figures..its used to identify a KOBO device. I keep forgetting that you guys support hundreds of devices.
However for my situation it was a problem and I figured that the boot loader space was identical for at least bunch of KOBO's (maybe all of them). So instead of testing for /bin/kobo_config.sh I tested on the presence of the hardware configuration hwcfg= in /proc/cmdline.
Code:
local handle = io.popen("grep -o hwcfg= /proc/cmdline")
local kobo_test_stat = handle:read("*line")
handle:close()
-- local kobo_test_stat = lfs.attributes("/bin/kobo_config.sh")
if kobo_test_stat then
util.noSDL()
return require("device/kobo/device")
end