View Single Post
Old 10-30-2009, 02:03 PM   #81
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Help: call to poweroff doesn't work inside lgob callback

Does anyone know why this code does not work?

Code:
btn:connect("clicked", function ()
                              win:hide()
                              win:destroy()
                              os.execute("/sbin/poweroff")
                           end)
If I substitute "/bin/poweroff" with "/sbin/fconfig" it prints ifconfig output on the terminal, so I'm pretty sure callback is correctly called.

I've also checked with "shutdown -t 0 now".
No way to switch off the Iliad from inside a lua+lgob program.

Thanks,
Iņigo
Iņigo is offline   Reply With Quote