reboot-manager records reboot context, classifies reboot reason, persists structured metadata,
and triggers reboot after cleanup and policy checks.
rebootnow/src/
├── main.c # argument parsing, reason classification, orchestration
├── cyclic_reboot.c # cyclic reboot pause/defer guard and state handling
├── system_cleanup.c # pre-reboot service cleanup
├── rbus_interface.c # RBUS get/set helpers
└── utils.c # timestamp, file-write helper, telemetry wrappers
Headers are exposed from rebootnow/include.
- Parse reboot trigger options (
-sor-c) and optional custom/other reason fields. - Emit T2 marker based on source process and trigger type.
- Classify reboot reason into app/ops/maintenance/firmware categories.
- Persist reboot metadata:
/opt/logs/rebootInfo.log/opt/secure/reboot/reboot.info/opt/secure/reboot/previousreboot.info/opt/secure/reboot/parodusreboot.info
- Apply cyclic reboot control to decide defer vs proceed.
- Perform pre-reboot cleanup and notification updates.
- Trigger reboot sequence with fallback (
reboot, thensystemctl reboot, thenreboot -f).
- RBUS: RFC/parameter reads and writes (notification and feature toggles)
- RDK Logger: reboot diagnostics and traceability logs
- Telemetry (T2): reboot marker emission (when enabled)
- Secure wrapper/system commands: controlled reboot and cleanup command execution
- PID-file guard prevents concurrent rebootnow instances.
- Structured files under
/opt/secure/rebootpreserve reboot context for downstream consumers. - Cyclic reboot logic prevents repeated immediate reboots under configured pause windows.