mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
network: Assign "static" MAC addresses to QMI interfaces
This is really badly hacky, but I do not know a better way to solve this with our existing "setup" program which would be a nightmare to extend. So we are using the device number to generate a static MAC address which can then be used as usual. I doubt many people will have more than one device. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Peter Müller
parent
8d09028b69
commit
580c249a5b
@@ -19,6 +19,8 @@
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
. /etc/rc.d/init.d/networking/functions.network
|
||||
|
||||
# Check if all appropriate variables are set
|
||||
[ -n "${INTERFACE}" ] || exit 2
|
||||
|
||||
@@ -44,6 +46,13 @@ if [ ! -r "/var/ipfire/ethernet/settings" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Change MAC addresses of QMI interface
|
||||
if [ -d "/sys/class/net/${INTERFACE}/qmi" ]; then
|
||||
if ! qmi_assign_address "${INTERFACE}"; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Read network settings
|
||||
eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user