0

I'm looking at a static OpenWrt firmware. On OpenWrt initialization, procd is supposed to run all the S prefixed scripts in /etc/rc.d which are links to the actual scripts in /etc/init.d. I wonder who triggers those scripts...

I see that on /etc/inittab there's this line ::sysinit:/etc/init.d/rcS S boot but /etc/init.d/rcS file does not exist, so who actually runs the scripts on /etc/rc.d and when does it happen on init?

I tried searching all over their documentation but still could not figure this out... Any ideas?

Thanks.

Gal Shahar
  • 2,695
  • 1
  • 21
  • 29
  • Apparently there's really no rcS script, but the beahviour is emulated by procd itself which runs all the scripts... – Gal Shahar Mar 19 '21 at 22:19

1 Answers1

1

Hi the openwrt using the program procd to run the /etc/init.d/* to init the all system. The boot sequence of openwrt is:

 /init - > /sbin/init -> /etc/preinit -> /sbin/procd -> /etc/rc.d/*

Actually openwrt always support the rcS, but openwrt didn't use this feature.

jack ma
  • 76
  • 5