Skip to content

Add local hostname to /etc/hosts file - #66

Merged
jamesyc merged 1 commit into
mainfrom
add-hostname-to-hosts
Apr 29, 2026
Merged

jamesyc merged 1 commit into
mainfrom
add-hostname-to-hosts

Conversation

@jamesyc

@jamesyc jamesyc commented Apr 29, 2026

Copy link
Copy Markdown
Owner

Add local hostname to /etc/hosts file

Workaround for #54 (comment)

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces a prepare_local_hostname_resolution function to the Samba startup script to ensure the device hostname resolves to 127.0.0.1, along with a new test case to verify the script's structure. Feedback was provided to make the /etc/hosts update idempotent, as the current implementation appends the entry on every run, potentially leading to duplicates.

Comment thread src/timecapsulesmb/assets/boot/samba4/start-samba.sh
@jamesyc
jamesyc merged commit b3e10f6 into main Apr 29, 2026
4 checks passed
@jamesyc
jamesyc deleted the add-hostname-to-hosts branch April 29, 2026 06:04
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.

1 participant