# Start up scripts not working

**URL:** <https://forum.legato.io/t/start-up-scripts-not-working/2151>\
**Category:** Legato Linux distribution (Yocto project)\
**Created:** [September 21, 2016, 7:37am UTC](https://forum.legato.io/t/start-up-scripts-not-working/2151 "2016-09-21T07:37:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![zabaulkhan](https://avatars.discourse-cdn.com/v4/letter/z/71e660/32.png) [@zabaulkhan](https://forum.legato.io/u/zabaulkhan)\
**Post date:** [November 9, 2016, 12:39pm UTC](https://forum.legato.io/t/start-up-scripts-not-working/2151/2 "2016-11-09T12:39:44Z")

</div>

Hi TBj,  
we can’t do it manually directly on the target (actually we can add the script manually on the target in the user1/MTD4 partition,  
but it will not be taken account during the bootup), so it needs to do it through Yocto by a regeneration of the rootFS.  
The reason why we can’t do it manually on the target is that the startup executes scripts from read-only file system (MTD2 partition),  
skipping the changes performed manually on the target (on the MTD4 partition).

It can be done in 2 ways:

1. Via INITSCRIPT\_PARAMS in yocto recipe:

You would need to specify run level for InIT script in INITSCRIPT\_PARAMS at your yocto “recipe” ,as in our case it is rcS.

INITSCRIPT\_NAME = “Your\_startup\_script”  
INITSCRIPT\_PARAMS = “start 90 S . stop 60 S .” //90 is secquence level for script and 60 is stop sequence

Init\_1.4.11 for refrence

1. Via update-rc.d  
Have shared sample recipe (initscripts) for it.

Regards,  
Hassan

[init\_1.4.11.txt](https://forum.legato.io/uploads/short-url/h7BUrYNE1diEEe971ksk4DeajTM.txt) (567 Bytes)

[initscripts.7z](https://forum.legato.io/uploads/short-url/wf2JJTZHUAA0unqCXDNiWaCVLPa.7z) (750 Bytes)

---

_[View the full topic](https://forum.legato.io/t/start-up-scripts-not-working/2151)._
