See also: procd-init-scripts#procd_init_scripts
procd is the OpenWrt process management daemon written in C. It keeps track of processes started from init scripts (via ubus calls), and can suppress redundant service start/restart requests when the config/environment has not changed.
procd has replaced ... , e.g.
hotplug2, a dynamic device management subsystem for embedded systems. Hotplug2 is a trivial replacement of some of the UDev functionality in a tiny pack, intended for Linux early userspace: Init RAM FS and InitRD.busybox-klogd and busybox-syslogdbusybox-watchdogprocd is intended to stay compatible with the existing format of /etc/config/; exceptions ...
:!: see commit in https://dev.openwrt.org/log/trunk/package/base-files/files/etc/rc.button
:!: see use case hardware.button
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:
Package history is available at:
<!-- -->