View Single Post
Old 05-30-2013, 04:15 PM   #8
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by xor_ View Post
Or you could add the invocation of your script to /etc/init.d/rcS, and then in the last line of your script restore the original /etc/init.d/rcS.

(The latter is problematic, though, in case the user has modified his rcS.)
That is why Mingyar takes the nightmode hack as model. It should go somehow like this:
1) let 98-autorunHook.rules start autorun.sh
2) autorun.sh inserts into rcS at some point, after the line that mounts mnt/onboard a line that starts runonlyonce.sh. Then it deletes 98-autorunHook.rules and itself.
3) When rcS is run, runonlyonce.sh does whatever it should do and then deletes itself. Optionally it could in addition also remove the line that was added to rcS which invokes runonlyonce.sh.

Last edited by tshering; 05-30-2013 at 04:18 PM.
tshering is offline   Reply With Quote