Odroid M1: add a network rule to rename default name

This commit is contained in:
Igor Pecovnik 2024-06-17 23:01:22 +02:00 committed by Igor
parent 2937ceb6de
commit 2a2e609e3c

View File

@ -77,4 +77,12 @@ function post_family_tweaks__config_odroidm1_fwenv() {
# MTD device name Device offset Env. size Flash sector size Number of sectors
/dev/mtd1 0x0000 0x20000
FW_ENV_CONFIG
# add a network rule to rename default name
display_alert "Creating network rename rule for Odroid M1"
mkdir -p "${SDCARD}"/etc/udev/rules.d/
cat <<- EOF > "${SDCARD}"/etc/udev/rules.d/70-rename-lan.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNEL=="end*", NAME="eth0"
EOF
}