PDA

View Full Version : Startup Script after boot


Hardknox
2010-03-10, 11:48
How do I try to run script automatically when phone switch on ?

nicolai
2010-03-10, 11:55
maemo uses upstart for scripts running after boot.
For examples take a look at /etc/event.d/ scripts.

nicolai

Hardknox
2010-03-10, 12:49
A strange way to run, does not resemble even bash, but if someone like me had problems even clearly described on http://upstart.ubuntu.com/getting-started.html

nowave7
2010-03-10, 12:59
Or you could do it the old fashioned way, by putting the script you want to run in /etc/init.d/, and the creating a link to it in /etc/rc2.d (default runlevel is 2, if I'm not mistaken).

cddiede
2010-03-10, 13:28
Or you could do it the old fashioned way, by putting the script you want to run in /etc/init.d/, and the creating a link to it in /etc/rc2.d (default runlevel is 2, if I'm not mistaken).

This won't work on the N900. Maemo5 doesn't use init, it uses upstart. So you have to make a script in /etc/event.d using the upstart start/stop script syntax.

nicolai
2010-03-10, 13:53
This won't work on the N900. Maemo5 doesn't use init, it uses upstart. So you have to make a script in /etc/event.d using the upstart start/stop script syntax.

This will work on the n900 as upstarts emulates init. There are already many files in /etc/rc?.d

nicolai

cddiede
2010-03-10, 14:38
This will work on the n900 as upstarts emulates init. There are already many files in /etc/rc?.d

nicolai

Believe me, I've tried it and it never worked. See this thread:

http://talk.maemo.org/showthread.php?t=35567

qwerty12
2010-03-11, 10:21
This will work on the n900 as upstarts emulates init. There are already many files in /etc/rc?.d


...which are called by files in /etc/event.d

I know Ubuntu has the upstart-compat-sysv package but Maemo doesn't have it. E.g. /etc/event.d/rc2 doesn't exist on my N900.

nicolai
2010-03-12, 14:16
Believe me, I've tried it and it never worked. See this thread:

http://talk.maemo.org/showthread.php?t=35567

...which are called by files in /etc/event.d

I know Ubuntu has the upstart-compat-sysv package but Maemo doesn't have it. E.g. /etc/event.d/rc2 doesn't exist on my N900.

my fault, you are right.

nicolai

les_garten
2010-03-20, 22:26
reading over this and trying a few things I still can't get this to do anything. I don't know Bumpkus about scripts!

I'm trying to start 3 appz everytime my N900 starts

Root xterm
Phone
Contacts

Can anybody give me some pointers.

I made a simple one line startup with the exec line for my root term and nothing started on boot. Placed it in /etc/event.d

cheungs
2010-04-12, 06:54
reading over this and trying a few things I still can't get this to do anything. I don't know Bumpkus about scripts!

I'm trying to start 3 appz everytime my N900 starts

Root xterm
Phone
Contacts

Can anybody give me some pointers.

I made a simple one line startup with the exec line for my root term and nothing started on boot. Placed it in /etc/event.d

This works for me:

user@Nokia-N900-02-8:/etc/event.d$ more rsyncd

start on stopped rcS

console output

respawn

script
exec /etc/init.d/rsync start
end script

nokian-series
2010-04-22, 06:38
So..how to clearly do a startup script?
I've read your trying steps but still confused.

Can we create a startupscript that run as root to chmod 777 some file ?

Thanks

diediaga
2010-04-27, 19:12
hi
I have a Nokia n810 that uses os2008 and I need to run a python script on startup. Can you please tell me how to do it?. I think all the coments here are for Maemo5 (n900), it is different in os2008?

many thanks