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

init-ifupdown: use different interfaces configs for devices


beagleboard: sets fixed mac address on first boot
emulator: eth0 is for simulator connection and eth1 for network
rest: use hostname for dns registration

Change-Id: I8acca677fcf7c6b85bb03ae0a29011c85b7ffbf3
Reviewed-by: default avatarSamuli Piippo <samuli.piippo@digia.com>
parent d585732d
No related branches found
No related tags found
No related merge requests found
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo inet loopback
# Wireless interfaces
iface wlan0 inet dhcp
wireless_mode managed
wireless_essid any
wpa-driver wext
wpa-conf /etc/wpa_supplicant.conf
iface atml0 inet dhcp
# Wired or wireless interfaces
auto eth0
iface eth0 inet dhcp
hostname `/bin/hostname`
# hwaddress ether 00:00:00:00:00:00
iface eth1 inet dhcp
# Ethernet/RNDIS gadget (g_ether)
# ... or on host side, usbnet and random hwaddr
iface usb0 inet static
address 192.168.7.2
netmask 255.255.255.0
network 192.168.7.0
gateway 192.168.7.1
# Bluetooth networking
iface bnep0 inet dhcp
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo inet loopback
# Wireless interfaces
iface wlan0 inet dhcp
wireless_mode managed
wireless_essid any
wpa-driver wext
wpa-conf /etc/wpa_supplicant.conf
iface atml0 inet dhcp
# Wired or wireless interfaces
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp
hostname `/bin/hostname`
# Ethernet/RNDIS gadget (g_ether)
# ... or on host side, usbnet and random hwaddr
iface usb0 inet static
address 192.168.7.2
netmask 255.255.255.0
network 192.168.7.0
gateway 192.168.7.1
# Bluetooth networking
iface bnep0 inet dhcp
...@@ -17,7 +17,6 @@ iface atml0 inet dhcp ...@@ -17,7 +17,6 @@ iface atml0 inet dhcp
auto eth0 auto eth0
iface eth0 inet dhcp iface eth0 inet dhcp
hostname `/bin/hostname` hostname `/bin/hostname`
# hwaddress ether 00:00:00:00:00:00
iface eth1 inet dhcp iface eth1 inet dhcp
# Ethernet/RNDIS gadget (g_ether) # Ethernet/RNDIS gadget (g_ether)
......
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://fixed_mac_address" SRC_URI_append_beagleboard = " file://fixed_mac_address"
do_install_append() { do_install_append_beagleboard() {
install -d ${D}${sysconfdir}/init.d install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/fixed_mac_address ${D}${sysconfdir}/network/if-pre-up.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