maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   [NOOB alert] how to make a startup script ? (https://talk.maemo.org/showthread.php?t=85709)

Dragoss91 2012-07-29 13:19

Re: [NOOB alert] how to make a startup script ?
 
Quote:

Originally Posted by MohammadAG (Post 1244499)
Those scripts are executed 2-5 minutes after startup, give it some time and see if it works then.

Also shouldn't be executing it as root?

So my script may work well but I didn't wait to see . Anyway I need some script that loads before opptimizer because changing freq and voltage too fast with SR2 on make my system crash .

yes , I've tried with -u root too but same result .

solbrit 2013-03-21 10:04

Re: [NOOB alert] how to make a startup script ?
 
Is there no way to run a script immediately on startup, i e without the 2-5 minute wait?

thedead1440 2013-03-21 10:13

Re: [NOOB alert] how to make a startup script ?
 
Quote:

Originally Posted by solbrit (Post 1330453)
Is there no way to run a script immediately on startup, i e without the 2-5 minute wait?

adding the .conf to /etc/init/ instead with signing of refhashlist might do it i think...

solbrit 2013-03-21 10:35

Re: [NOOB alert] how to make a startup script ?
 
Quote:

Originally Posted by thedead1440 (Post 1330455)
adding the .conf to /etc/init/ instead with signing of refhashlist might do it i think...

by simply running 'perl refhashlist.pl' right? I'll give it a try. Thanks!

solbrit 2013-03-22 01:21

Re: [NOOB alert] how to make a startup script ?
 
Adding anything to /etc/init/ will cause an immediate reboot.
'perl refhashlist.pl' doesn't work either so I guess I'm doing this all wrong...

pichlo 2013-03-22 09:17

Re: [NOOB alert] how to make a startup script ?
 
Quote:

Originally Posted by solbrit (Post 1330650)
Adding anything to /etc/init/ will cause an immediate reboot.

That might happen if you use things that rely on other things not yet initialized. Although a more likely outcome is that it simply won't do anything. Try experimenting with the order of execution. /etc/event.d is also a good place but the scripts there have to adhere to a strict format otherwise they won't run. Look at some existing ones (as well as a copious use of Google) for an inspiration.

ladoga 2013-03-22 09:45

Re: [NOOB alert] how to make a startup script ?
 
This is probably not the best solution, but if you are in patched open mode then you can add your commands to /etc/init.d/rcS.

In protected mode using inception you'd need to update refhashlist or aegis will lock the file and malf your phone so I don't recommend trying that unless you know what you are doing.

Also if you are in patched open mode you might investigate doing your own startup script in /etc/init.d (i suppose it's not allowed in normal mode, correct me if I'm wrong.)


All times are GMT. The time now is 15:10.

vBulletin® Version 3.8.8