Skip to content
Snippets Groups Projects
Commit 4362b2c7 authored by Jonas Höppner's avatar Jonas Höppner
Browse files

systemd: Remove networkd depending on gplv3 in DISTRO_FEATURE, configure MAC Address

Normally we would use network-manager, but for the gplv3 free variants
it is not available. In these cases we keep systemd-networkd as
network tools available.
Also adapt the call to gf-network-conf in the postinsts step during the
first boot to automatically determine the used network tooling.
This way the configuration for systemd-networkd is generated from the
xml setting as needed.

Until now the MACAdress was not configured if systemd-networkd was used.
Now the MACAddress is added to the newwork config file like it is done
when network-manager is used.

(cherry picked from commit 91b1c14e)
parent 5f2b57f0
No related branches found
No related tags found
2 merge requests!418Integrate gitlab-ci/fix-gitlab-ci-integration and 6 more,!396Pull changes from dunfell branch
# We use network manager for the guf distro # We use network manager for the guf-wayland distro
# ( in fngsystem it is still in use) # but the no-gplv3 variants are using systemd-networkd
PACKAGECONFIG:remove:seconorth = " networkd " # as network-manager does not work without some gplv3
# tools
PACKAGECONFIG:remove = " \
${@bb.utils.contains('DISTRO_FEATURES', 'gplv3', 'networkd', '', d)}"
...@@ -98,9 +98,10 @@ do_install() { ...@@ -98,9 +98,10 @@ do_install() {
install -m 0644 ${S}/config-default-wlan0-ap.xml ${D}/usr/share/sharedconf/ install -m 0644 ${S}/config-default-wlan0-ap.xml ${D}/usr/share/sharedconf/
} }
# Use _guf override as this is not suitable for fngsystem
pkg_postinst_ontarget:${PN}-network:seconorth () { pkg_postinst_ontarget:${PN}-network:seconorth () {
# Write Network Manager connections SECO North device config during first boot # Write Network Manager connections SECO North device config during first boot
${sbindir}/gf-network-conf.sh --format=networkmanager generate ${sbindir}/gf-network-conf.sh generate
} }
FILES:${PN} = " \ FILES:${PN} = " \
......
...@@ -145,12 +145,15 @@ generate_networkd_config() ...@@ -145,12 +145,15 @@ generate_networkd_config()
ND_IP="$3" ND_IP="$3"
mask2cidr -v ND_CIDR "$4" mask2cidr -v ND_CIDR "$4"
ND_GW="$5" ND_GW="$5"
#ND_MAC="$6" ND_MAC="$6"
cat <<- EOF cat <<- EOF
[Match] [Match]
Name=$ND_INTERFACE Name=$ND_INTERFACE
[Link]
MACAddress=$ND_MAC
[Network] [Network]
EOF EOF
...@@ -182,7 +185,7 @@ generate_nm_config() ...@@ -182,7 +185,7 @@ generate_nm_config()
NM_GW="$5" NM_GW="$5"
NM_MAC="$6" NM_MAC="$6"
NM_UUID=$(uuidgen) || error_out "Failed to genarate an uuid" NM_UUID=$(uuidgen) || error_out "Failed to generate an uuid"
cat <<- EOF cat <<- EOF
[connection] [connection]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment