init-start does not work anymore after upgrde to fork V44EA

  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

Gravityz

Regular Contributor
notrmally i would have put this in the fork thread but since we can not do that anymore we need to post new threads

since i installed V44EA (RT-AC66U)i noticed that my scripts do not start up automatically any more

in the /jffs/scripts i have an executable script called init-start

#! /bin/sh
cru a CheckIfHome "*/1 * * * * /jffs/scripts/CheckIfHome"


this does not startup script CheckIfHome anymore

when i fire up CheckIfHome manually it works

what has changed?
to be sure i reformatted jffs and copied the files but without succes
 

ColinTaylor

Part of the Furniture
Is "Enable JFFS custom scripts and configs" set to Yes?

How many other scripts do you have? Is this the only one that doesn't work?

Have you tried the following commands:
Code:
dos2unix /jffs/scripts/init-start
dos2unix /jffs/scripts/CheckIfHome
 

Maverickcdn

Senior Member
To add to Colins reply...

You say its executable, but is it really? Did you chmod a+rx both init-start and your CheckIfHome script?

Also does 'cru l' show your init-start running and adding the cron entry to cru at all? Its unclear if its init-start not running properly, or the cron entry its adding for your homebrew script that isnt running at 1 minute
 

Gravityz

Regular Contributor
ok i did some testing.

starting init-start manually did not work. it also did not show up with cru l
starting CheckIfHome manually did work like i mentioned before.

checked properties of init-start and it had 0777 so execution rights.

i opened init-start again and noticed a space between #! and /bin/sh

old
#! /bin/sh

changed into
#!/bin/sh

rebooted the router and run cru l

now it shows
*/1 * * * * /jffs/scripts/CheckIfHome #CheckIfHome#

also it looks like it is working now

the weird thing is i did not change this script for years.

it looks like the old firmware acepted this space while the newer one does not.
 

Maverickcdn

Senior Member
Sounds like you got it figured it out for the most part (except how that space got there :rolleyes: )

You have to be sure all scripts you want run automatically whether it be called by cron(cru) or the baked in init-start etc. they need to have execution rights. Does CheckIfHome also have execution rights? Otherwise I dont think cron will be able to start it.

Good Linux habits you should set all to 0755 not 0777, in this case its easiest to just blanket everything in the folder instead of individual files..

From the Merlin Wiki
Code:
chmod a+rx /jffs/scripts/*
 

Gravityz

Regular Contributor
thanks,
somewhere i knew it needed to be 0755 but when things do not work you take extreme measures HaHa
 

SomeWhereOverTheRainBow

Very Senior Member
notrmally i would have put this in the fork thread but since we can not do that anymore we need to post new threads

since i installed V44EA (RT-AC66U)i noticed that my scripts do not start up automatically any more

in the /jffs/scripts i have an executable script called init-start

#! /bin/sh
cru a CheckIfHome "*/1 * * * * /jffs/scripts/CheckIfHome"


this does not startup script CheckIfHome anymore

when i fire up CheckIfHome manually it works

what has changed?
to be sure i reformatted jffs and copied the files but without succes
I would place that in services-start not init-start. Sometimes init-start is a bit buggy with cru because it is the earliest point on the router startup
 

Sign Up For SNBForums Daily Digest

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