Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meta-lxatac-bsp: lxatac-factory-data: order service before udev #115

Merged
merged 3 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
[Unit]
Description=Gather and Distribute Factory Data
Before=NetworkManager.service
DefaultDependencies=no
After=systemd-remount-fs.service
Before=systemd-udevd.service

[Service]
Type=oneshot
ExecStart=/usr/sbin/lxatac-factory-data

[Install]
WantedBy=multi-user.target
WantedBy=sysinit.target
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ DST_LINK_FILE_BASE="/run/systemd/network/"
mkdir -p "${DST_ENVS_BASE}"
mkdir -p "${DST_LINK_FILE_BASE}"

# Set the static hostname if it is not set yet
# (The transient hostname is passed via systemd.hostname= commandline)
# --------------------------------------------------------------------
# If no hostname is set yet persist the one we currently have.
# The hostname is passed in from the bootloader via the
# systemd.hostname= kernel commandline and interpreted by init.
# -------------------------------------------------------------

if [[ ! -e /etc/hostname ]]
then
hostname="$(hostnamectl --transient hostname)"
hostnamectl --static hostname "${hostname}"
hostname > /etc/hostname
fi

# Read Factory Data passed to us by barebox via the devicetree
Expand Down Expand Up @@ -67,4 +67,3 @@ OriginalName=tac-bridge
MACAddress=${MAC_BRIDGE}
MACAddressPolicy=none
EOF

Loading