Checking that Startup script is running

For talk and support relating specifically to Puppy derivatives
Post Reply
Message
Author
edwin.evans
Posts: 60
Joined: Thu 15 Nov 2012, 16:06

Checking that Startup script is running

#1 Post by edwin.evans »

I have a script in /root/Startup and it calls echo "test" > test.log. If I run it by itself it creates the test.log file, but it doesn't create it at startup. Does this mean my script isn't running, and if so what should I check?

edwin.evans
Posts: 60
Joined: Thu 15 Nov 2012, 16:06

#2 Post by edwin.evans »

(Sorry I posted this in wrong section. I didn't notice where I was. I'll be more careful in future.)

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#3 Post by rcrsn51 »

What Puppy are you using?

Is the script executable? Will it run just by clicking on it?

Try using a full path, like

Code: Select all

echo "test" > /tmp/test.log

edwin.evans
Posts: 60
Joined: Thu 15 Nov 2012, 16:06

#4 Post by edwin.evans »

Yep, that was it. I didn't have the full path. Thanks!

It still isn't setting the time right, but now at least I know it is getting called and can debug. All I'm doing is running:
ntpdate north-america.pool.ntp.org

It works fine if I run the script that contains this line manually.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#5 Post by rcrsn51 »

Try this

Code: Select all

ntpdate north-america.pool.ntp.org > /tmp/ntp.log 2>&1
This would dump any error messages to the file /tmp/ntp.log

edwin.evans
Posts: 60
Joined: Thu 15 Nov 2012, 16:06

#6 Post by edwin.evans »

Thanks! I'm good now :)

I needed to open ntp ports in /etc/services (http://www.ducea.com/2006/09/11/error-s ... _socktype/) and make sure it was run after network startup.

Post Reply