Skip to content
Snippets Groups Projects
Commit 5b594414 authored by Samuli Piippo's avatar Samuli Piippo
Browse files

init-ifupdown: use fixed MAC address


Since beagleboard does not have fixed MAC address, use
interfaces config to set it. This will use the MAC address
from the first boot (which is random) in subsequent restarts.

Change-Id: I2ea5e92b2b29f7aad7b40a7fb14ba8ca8d4fbe7a
Reviewed-by: default avatarKalle Viironen <kalle.viironen@digia.com>
parent c572bf04
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
if [ ! -e /etc/network/interfaces.fixed ]; then
HWADDRESS=$(cat /sys/class/net/eth0/address)
sed -i -e 's,^#\(.*\)00:00:00:00:00:00,\1'$HWADDRESS',' /etc/network/interfaces
touch /etc/network/interfaces.fixed
fi
......@@ -16,7 +16,8 @@ iface atml0 inet dhcp
# Wired or wireless interfaces
auto eth0
iface eth0 inet dhcp
hostname `/bin/hostname`
hostname `/bin/hostname`
# hwaddress ether 00:00:00:00:00:00
iface eth1 inet dhcp
# Ethernet/RNDIS gadget (g_ether)
......
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://fixed_mac_address"
do_install_append() {
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/fixed_mac_address ${D}${sysconfdir}/network/if-pre-up.d/
}
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