View Single Post
Old 05-30-2013, 07:29 PM   #13
Mingyar
Connoisseur
Mingyar is a marvel to beholdMingyar is a marvel to beholdMingyar is a marvel to beholdMingyar is a marvel to beholdMingyar is a marvel to beholdMingyar is a marvel to beholdMingyar is a marvel to beholdMingyar is a marvel to beholdMingyar is a marvel to beholdMingyar is a marvel to beholdMingyar is a marvel to behold
 
Posts: 93
Karma: 11824
Join Date: Feb 2013
Device: Kobo Mini/Aura H2O/Aura One LE / Tea Inkpad 3
Thanks all !

It works well now
My way to make it work is not perfect maybe, but it works.

autorun.sh :
Code:
#!/bin/sh

if [ `grep -c "MyScript" /etc/init.d/rcS` -eq 0 ]
then
   cp /etc/init.d/rcS /root/rcS
   chmod a+x /root/rcS
   echo "" >>/etc/init.d/rcS
   echo "nohup /mnt/onboard/.kobo/MyScript.sh &" >>/etc/init.d/rcS
   echo "sleep 5" >>/etc/init.d/rcS
   echo "if [ -s /root/rcS ]" >>/etc/init.d/rcS
   echo "then" >>/etc/init.d/rcS
   echo "   rm -rf /etc/init.d/rcS" >>/etc/init.d/rcS
   echo "   mv -f /root/rcS /etc/init.d/rcS" >>/etc/init.d/rcS
# for debug begin
   echo "else echo 'no /root/rcS' >/mnt/onboard/.kobo/NorcS.log 2>&1" >>/etc/init.d/rcS
# for debug end
   echo "fi" >>/etc/init.d/rcS
   echo "" >>/etc/init.d/rcS
fi

rm /etc/udev/rules.d/98-autorunHook.rules
rm /root/autorun.sh

sync
reboot
With your help, I progress
Mingyar is offline   Reply With Quote