View Single Post
Old 05-08-2013, 05:01 AM   #11
Lucas Malor
Pain in the arse
Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.
 
Lucas Malor's Avatar
 
Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
Quote:
Originally Posted by KevinShort View Post
First I moved /sbin/poweroff to /usr/local/. Then I created a new "poweroff" file in /sbin/ to replace the poweroff we just moved.
Code:
vi /sbin/poweroff
I made the new "poweroff" file a shell script, with the following lines:
Code:
#!/bin/sh
zcat /etc/images/kraken-ghostbuster.raw.gz | /usr/local/Kobo/pickel showpic
cat /mnt/onboard/YOUR_IMAGE.raw | /usr/local/Kobo/pickel showpic
/usr/local/poweroff &
Don't forget to make it executable with "chmod +x /sbin/poweroff".
I've used this hack to interpose a I/O to disk here, since using inittab doesn't work. Unluckily I noticed that I can't power on Kobo using the power button. I connected it to my pc with usb and it waked up instantly. I retried another time but this happened again. I think poweroff is not executed: the powered off image was displayed, but the device was not really powered off. My script was simply:

Code:
#!/bin/sh
/usr/local/poweroff &
the script was executed, since I tested it with an echo before the poweroff line. Are you sure I must add the & at the end of command? Maybe with the & the shell waits poweroff and poweroff waits the shell... I can test it but I was a little scared when the Kobo didn't power on...

Last edited by Lucas Malor; 05-08-2013 at 05:04 AM.
Lucas Malor is offline   Reply With Quote