Skip to content

Commit

Permalink
Merge pull request #115 from hnez/tac-bridge-link-order
Browse files Browse the repository at this point in the history
meta-lxatac-bsp: lxatac-factory-data: order service before udev
  • Loading branch information
hnez authored Mar 1, 2024
2 parents b657f5b + 07a08bd commit 1c380b7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
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

0 comments on commit 1c380b7

Please sign in to comment.