| Author |
Message |
edwin.evans
Joined: 15 Nov 2012 Posts: 60
|
Posted: Tue 20 Nov 2012, 18:57 Post subject:
Checking that Startup script is running |
|
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?
|
|
Back to top
|
|
 |
edwin.evans
Joined: 15 Nov 2012 Posts: 60
|
Posted: Tue 20 Nov 2012, 19:00 Post subject:
|
|
(Sorry I posted this in wrong section. I didn't notice where I was. I'll be more careful in future.)
|
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 7758 Location: Stratford, Ontario
|
Posted: Tue 20 Nov 2012, 19:08 Post subject:
|
|
What Puppy are you using?
Is the script executable? Will it run just by clicking on it?
Try using a full path, like
| Code: | | echo "test" > /tmp/test.log |
|
|
Back to top
|
|
 |
edwin.evans
Joined: 15 Nov 2012 Posts: 60
|
Posted: Tue 20 Nov 2012, 20:50 Post subject:
|
|
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.
|
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 7758 Location: Stratford, Ontario
|
Posted: Tue 20 Nov 2012, 21:24 Post subject:
|
|
Try this
| Code: | | ntpdate north-america.pool.ntp.org > /tmp/ntp.log 2>&1 |
This would dump any error messages to the file /tmp/ntp.log
|
|
Back to top
|
|
 |
edwin.evans
Joined: 15 Nov 2012 Posts: 60
|
Posted: Wed 21 Nov 2012, 00:53 Post subject:
|
|
Thanks! I'm good now
I needed to open ntp ports in /etc/services (http://www.ducea.com/2006/09/11/error-servname-not-supported-for-ai_socktype/) and make sure it was run after network startup.
|
|
Back to top
|
|
 |
|