I tried it. The problem is that the password check executable cannot read touch input while koreader has a lock on it. Since I do not speak lua, I cannot solve this.
EDIT: In case somebody wants to play around with this. This is what I did
Spoiler:
I modified \koreader\frontend\device\kobo\device.lua:
Code:
function Kobo:resume()
os.execute("echo 0 > /sys/power/state-extended")
os.execute("/mnt/onboard/.adds/kbmenu_user/scripts/tests/checkpw.sh")
if self.powerd then
if KOBO_LIGHT_ON_START and tonumber(KOBO_LIGHT_ON_START) > -1 then
self.powerd:setIntensity(math.max(math.min(KOBO_LIGHT_ON_START,100),0))
elseif self.powerd.fl ~= nil then
self.powerd.fl:restore()
end
end
Generic.resume(self)
end
checkpw.sh
Code:
#!/bin/sh
ksmroot=${ksmroot:-"/adds/kbmenu"}
pwfile="$ksmroot/kbbouncer/bouncerpw.txt"
if [ -e $pwfile ] && [ "$($ksmroot/onstart/checkbouncerinstall.sh)" == "ok" ]; then
export KBBouncerMode=
bouncer=$ksmroot/kbbouncer/kbbouncer.sh
pw=$(cat $pwfile)
answer=""
pwcount=0
while [ "$answer" != "passed" ] && [ $pwcount -lt 3 ]; do
answer=$($bouncer "$pw")
let pwcount++
done
if [ "$answer" == "failed" ]; then
$ksmroot/onstart/poweroff.sh
fi
fi
Be aware that this does NOT work. You will be offered the password check, but you cannot enter the password!