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-26 12:20

[NOOB alert] how to make a startup script ?
 
I still didn't figure how to fix this .

Now I was thinking to create a startup script that disables SR2 once system and overclock loads . Now if I enable Apply on startup and reboot my device , the phone will reboot twice or even three times because alaways is loading OC profile without disabling SR2 .

This SR2 is a pain , it f**s up every overclocking profile , making phone running very unstable , everytime forcing you to increase voltage a lot and still NOT stable . I nearly threw my phone against the wall when I got reboot while talking . :mad:

Dragoss91 2012-07-28 21:34

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

ZogG 2012-07-28 21:51

Re: [NOOB alert] how to make a startup script ?
 
doesn't ariadne sh "..." ask for password?

"NOOB alert]" — maybe than overclock idea is not the best option to play with?

Dragoss91 2012-07-28 22:22

Re: [NOOB alert] how to make a startup script ?
 
yes it asks for password, in the past i used opensh -c . I know what i am doing but i need a little help

ZogG 2012-07-28 22:48

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

Originally Posted by Dragoss91 (Post 1244314)
yes it asks for password, in the past i used opensh -c . I know what i am doing but i need a little help

that was the help, it asks for password, so script doesn't really run as you don't enter password?!

Dragoss91 2012-07-29 08:32

Re: [NOOB alert] how to make a startup script ?
 
Yes I figured this so I tried ariadne -u root ... same result , also chmod -x /opt/overclock/* . :-s

MohammadAG 2012-07-29 08:42

Re: [NOOB alert] how to make a startup script ?
 
echo rootme | ariadne... might work

Dragoss91 2012-07-29 09:07

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

Originally Posted by MohammadAG (Post 1244443)
echo rootme | ariadne... might work

works like a charm ... thanks :D

Dragoss91 2012-07-29 10:22

Re: [NOOB alert] how to make a startup script ?
 
Now I made a .conf file in /etc/init/apps/ but it doesn't load at startup .

This is the .conf file

Code:

description "Disable Smart Reflex 2"
author "dragoss"
stop on stopping xsession
normal exit 0
exec /usr/bin/aegis-exec -s -u user -l "exec /opt/overclock/ocDSR"


I tried also to add echo 0 > /sys/power/sr_vdd2_autocomp in the FasterN9.sh wich is loaded at startup , but still doesn't work .

MohammadAG 2012-07-29 10:46

Re: [NOOB alert] how to make a startup script ?
 
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?

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:12.

vBulletin® Version 3.8.8