Skip to content

Make 70.dhclient.conf append ma1 client-id only once (Fixes #306) - #317

Open
gavin-Angry-Birds wants to merge 1 commit into
dentproject:mainfrom
gavin-Angry-Birds:fix/issue-306-dhclient-conf-idempotent
Open

gavin-Angry-Birds wants to merge 1 commit into
dentproject:mainfrom
gavin-Angry-Birds:fix/issue-306-dhclient-conf-idempotent

Conversation

@gavin-Angry-Birds

Copy link
Copy Markdown

Summary

  • boot.d/70.dhclient.conf used >> on every boot, duplicating the ma1 block
  • Skip append when interface "ma1" is already present
  • Keep dhcp-client-identifier for ONIE/ONL compatibility

Test plan

Notes

No DENT switch hardware on my side; please say if you want a different guard (e.g. match full client-id line).

…ct#306)

Boot used >> into /etc/dhcp/dhclient.conf every time, so the ma1
block grew on each reboot. Skip when the interface block already
exists; keep the ONIE-compatible client-id behavior.

Verified with MA1_MAC and a temporary DHCLIENT_CONF (no switch HW).

Signed-off-by: gavin-Angry-Birds <gavincodegk@gmail.com>
@gavin-Angry-Birds
gavin-Angry-Birds force-pushed the fix/issue-306-dhclient-conf-idempotent branch from d31b7b2 to c01b2d4 Compare September 7, 2026 08:41

@paulmenzel paulmenzel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for your patch.

Please amend the commit and take the Fixes: out of the summary/title, and add the tag

Resolves: https://github.com/dentproject/dentOS/issues/306

to the bottom of the body.

Also, if possible, please use your full name in the author field and Signed-off-by: line instead of gavin-Angry-Birds.

Regarding the diff, it looks like a valid approach, despite a better general design, where and how the line is added, might be preferable.

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.

boot.d/70.dhclient.conf: Appends management interface entry at each boot

2 participants