mirror of
https://github.com/RhapsodiOS/RhapsodiOS.git
synced 2026-11-03 22:01:40 -07:00
[GH-ISSUE #27] startup: syslogd starts after 0800_Network, so boot-time dhcpcd messages are lost #24
Labels
No labels
bug
documentation
enhancement
enhancement
good first issue
help wanted
help wanted
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github-starred/RhapsodiOS#24
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @raynorpat on GitHub (Sep 25, 2026).
Original GitHub issue: https://github.com/RhapsodiOS/RhapsodiOS/issues/27
Symptom
Nothing that the startup scripts before
0900_SystemLogsend through syslog(3) reaches/var/log/system.logor the console. This showed up while boot-testing dhcpcd on the i386 guest.0800_Networkrunsdhcpcd -w -t 30 en0, and none of that run's messages were logged: the lease, a DHCP_NAK, "timed out waiting for a valid DHCP server response". The same messages appear normally when dhcpcd is run by hand after boot.Kernel messages are not affected, because syslogd reads the kernel message buffer when it starts. Only userland
syslog()calls made before syslogd exists are lost.Cause
In
src/files-5/private/etc/startup/,0900_SystemLogstartssyslogdafter0800_Network; Apple's DR2 layout has the same order (0400_Network, then0700_SystemLog). Until then/dev/logdoes not exist.syslog(3)drops the message unless the caller opened the log withLOG_CONS. dhcpcd opens it asopenlog("dhcpcd", LOG_PID, LOG_LOCAL0)(src/dhcpcd-1/dhcpcd.tproj/dhcpcd.c:184).Other daemons and tools started in 0100–0800 are probably affected the same way. I only checked dhcpcd.
Constraint on moving syslogd earlier
syslogdreads the hostname once, inmain()(src/Commands/network_cmds/syslogd.tproj/syslogd.c:271), and SIGHUP does not refresh it.0800_Networkis what sets the hostname, so a syslogd started earlier would stamp every line with the pre-network name (localhost) for the whole run. It would also resolve any@hostforwarding entries before the network is up.Options
0800_Network(after0100_LocalMounts/0400_CleanUp), and have it pick up the hostname later. For example, restart it after0800_Network, or makeinit()re-read the hostname on SIGHUP and HUP it from0800_Network.LOG_CONSso their messages at least reach the console. For dhcpcd that is a one-flag change, but it doesn't help anything else.Found during the dhcpcd-1 guest checklist (
docs/superpowers/plans/2026-09-22-dhcpcd-1-client-daemon.md, Task 8). It is why that checklist can't show boot-time DHCP message traces.