What's new

scripts not executing on boot

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

mzuri

Occasional Visitor
Hi all,

I am having problems with my script not executing at boot. I see some old threads and have tried all the solutions but this is driving me crazy.

1 I started with fresh reset
2. Format jffs / enable jffs script and reboot
3. Services-start.sh script copied into Nano (through putty) as Notepad++ and WinSCP transfer came up with file not found error although file is seen with ‘ls’ command in the scripts directory
4. shebang on 1st line , combinations of sleep 10 to sleep 60 on 2nd line
5. After changing direcory ‘cd /jffs/scripts’ followed by chmod a+rw

Executes fine directly with ./services.start.sh but does not invoke/execute at boot:(

Help!

thanks for any advice
 
Did you checked "Yes" to "Enable JFFS custom scripts and configs", right below "Format JFFS partition at next boot" ?
 
Hi all,

I am having problems with my script not executing at boot. I see some old threads and have tried all the solutions but this is driving me crazy.
Shouldn't that be chmod a+rx?

1 I started with fresh reset
2. Format jffs / enable jffs script and reboot
3. Services-start.sh script copied into Nano (through putty) as Notepad++ and WinSCP transfer came up with file not found error although file is seen with ‘ls’ command in the scripts directory
4. shebang on 1st line , combinations of sleep 10 to sleep 60 on 2nd line
5. After changing direcory ‘cd /jffs/scripts’ followed by chmod a+rw

Executes fine directly with ./services.start.sh but does not invoke/execute at boot:(

Help!

thanks for any advice
 
Hi all,

I am having problems with my script not executing at boot. I see some old threads and have tried all the solutions but this is driving me crazy.

1 I started with fresh reset
2. Format jffs / enable jffs script and reboot
3. Services-start.sh script copied into Nano (through putty) as Notepad++ and WinSCP transfer came up with file not found error although file is seen with ‘ls’ command in the scripts directory
4. shebang on 1st line , combinations of sleep 10 to sleep 60 on 2nd line
5. After changing direcory ‘cd /jffs/scripts’ followed by chmod a+rw

Executes fine directly with ./services.start.sh but does not invoke/execute at boot:(

Help!

thanks for any advice

Your file name is wrong, the full path should be "/jffs/scripts/services-start"
 

Ok maybe I am just dumb but how is the file name 'services-start' different from my 'services-start' ?

And yes #2 - I did check "Yes" to "Enable JFFS custom scripts and configs", right below "Format JFFS partition at next boot"

Here is my file info:

Code:
admin@RT-AC68U-CFC8:/tmp/home/root# cd /jffs/scripts
admin@RT-AC68U-CFC8:/jffs/scripts# ls -t
services-start.sh

:confused:
 
services-start.sh
services-start

This is the differences.
 
services-start.sh
services-start

This is the differences.

You are absolutely right! I reset to factory and enabled JFFS custom scripts and configs", right below "Format JFFS partition at next boot" . Then SSHed with putty

Code:
admin@RT-AC68U-CFC8:/tmp/home/root# cd /jffs/scripts
admin@RT-AC68U-CFC8:/jffs/scripts# nano

Inserted code & saved as services-start NOT as services-start.sh (as I must have done previously:oops:)
Code:
admin@RT-AC68U-CFC8:/jffs/scripts# chmod a+rx /jffs/scripts/*
admin@RT-AC68U-CFC8:/jffs/scripts# ls -t
services-start
admin@RT-AC68U-CFC8:/jffs/scripts# reboot

services-start invoked & executed correctly:):D

Thank you Octopus for holding my hand - May you grow many more arms!
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top