Skip to content

add edgeos-hostname service using device UUID for mDNS#39

Merged
mihai-chiorean merged 1 commit intoedgeengineer:mainfrom
StefanaHanc:feature/edgeos-hostname
Oct 3, 2025
Merged

add edgeos-hostname service using device UUID for mDNS#39
mihai-chiorean merged 1 commit intoedgeengineer:mainfrom
StefanaHanc:feature/edgeos-hostname

Conversation

@StefanaHanc
Copy link
Contributor

Updated generate-hostname.sh script to generate hostname from device UUID (with fallback to serial/MAC).

Updated edgeos-hostname.service systemd unit to set and persist hostname at boot.

Updated avahi-daemon.conf automatically with correct defaults (dbus enabled, IPv4/IPv6, reflector, publishing).

Added 90-edgeos.preset to ensure the service is enabled by default on first boot.

Updated edgeos-image.bb to include required runtime packages (inetutils-hostname, avahi-daemon, avahi-edgeos-hostname).

IMAGE_INSTALL:append = " inetutils-hostname"

# Avahi + the sub-package with the custom script/service
IMAGE_INSTALL:append = " avahi-daemon avahi-edgeos-hostname"
Copy link
Member

Choose a reason for hiding this comment

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

I thought avahi daemon was already installed somewhere. not a problem. I'm sure the build system will figure it out.

uuid="${uuid//-/}"
uuid="${uuid,,}"
short_id="${uuid: -8}"
else
Copy link
Member

Choose a reason for hiding this comment

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

nice

@mihai-chiorean mihai-chiorean merged commit 2fb464b into edgeengineer:main Oct 3, 2025
3 checks passed
@mihai-chiorean
Copy link
Member

Resolves #33

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