LEDE uses procd for initializing the system, managing processes and handling parts of the kernel/userspace interaction. It can be considered similar to systemd on full blown distributions. Here is a list of tasks that procd will do for us
Before the real procd runs, a small init process is started. This process has the job of early system init. It will do the following things in the listed order
Once preinit is complete the init process is done and will do an exec on the real procd. This will replace init as pid1 with an instance of procd running as the new pid 1. The watchdog file descriptor is not closed. Instead it is handed over to the new procd process. The debug_level will also be handed over to the new procd instance if it was set via command line or during preinit.
Procd will first do some basic process init such as setting itself to be owner of its own process group and setting up signals. We are now ready to bring up the userland in the following order
The basic system bringup is now complete, procd is up and running and can start handling daemons and services
Procd supports four commands inside inittab
Once all items inside /etc/inittab are processed, procd enter its normal run mode and will handle messages coming in via ubus. It will stay in this state until a reboot/shutdown is triggered.
Hotplug scripts are located inside /etc/hotplug.d and are based on json_script. This is a json based if then else syntax. Procd hotplug service offers the following actions: