Skip to content

dhcpcd: minimize log duplication - #62573

Open
mxlgv wants to merge 1 commit into
void-linux:masterfrom
mxlgv:min-dhcpcd-log-dup
Open

mxlgv wants to merge 1 commit into
void-linux:masterfrom
mxlgv:min-dhcpcd-log-dup

Conversation

@mxlgv

@mxlgv mxlgv commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Testing the changes

  • I tested the changes in this PR: briefly

Local build testing

  • I built this PR locally for my native architecture, x86_64-glibc

Note

This relates to an issue that could not be resolved simply by disabling the logging service.

Therefore, the final solution is to keep the logging service enabled to capture critical errors and any errors that might occur before dhcpcd's own logging initializes.

Thanks to the -q option, we will no longer receive duplicate normal messages, though critical will still be duplicated.

Comment thread srcpkgs/dhcpcd/files/dhcpcd-eth0/run Outdated
exec 2>&1
[ -r conf ] && . ./conf
exec dhcpcd -B eth0 $OPTS 1>&2
exec dhcpcd -q -B eth0 $OPTS 1>&2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
exec dhcpcd -q -B eth0 $OPTS 1>&2
exec dhcpcd -B eth0 ${OPTS:--q} 1>&2

If this is to be applied, it needs to be a default fallback for $OPTS, not forced into everybody's invocation with no means to override.

Comment thread srcpkgs/dhcpcd/files/dhcpcd/run Outdated
exec 2>&1
[ -r conf ] && . ./conf
exec dhcpcd -B ${OPTS:=-M} 1>&2
exec dhcpcd -q -B ${OPTS:=-M} 1>&2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
exec dhcpcd -q -B ${OPTS:=-M} 1>&2
exec dhcpcd -B ${OPTS:--M -q} 1>&2

As in the other case, this needs to be an overridable default, not a hard imposition.

This also swaps the substitution to remove an assignment to OPTS, which is superfluous here.

@mxlgv
mxlgv force-pushed the min-dhcpcd-log-dup branch from 43e0346 to bd9e1c0 Compare September 21, 2026 05:55
@mxlgv

mxlgv commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

@ahesford Thanks for the help! I made the corrections according to your instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants