summaryrefslogtreecommitdiff
path: root/include/inject.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-05-07 17:00:41 +0100
committerLeah Rowe <leah@libreboot.org>2025-05-07 17:00:41 +0100
commite3098c61f43575650628fc4e6f7e1693c44ac337 (patch)
tree3892b69401d128488e2322b62443d1d4cf56bf8b /include/inject.sh
parentd530e68594d39076831d7a232ea17c8b42d73b4f (diff)
inject.sh: simplified MAC address handling
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/inject.sh')
-rw-r--r--include/inject.sh7
1 files changed, 1 insertions, 6 deletions
diff --git a/include/inject.sh b/include/inject.sh
index 7bcd5bc7..e64c304e 100644
--- a/include/inject.sh
+++ b/include/inject.sh
@@ -354,7 +354,7 @@ patch_release_roms()
fi
) || err "'$archive' -> Can't verify vendor hashes. $dontflash"
- [ -z "$new_mac" ] || modify_mac || printf "\nGbE not defined\n" 1>&2
+ [ -z "$new_mac" ] || [ -z "$CONFIG_GBE_BIN_PATH" ] || modify_mac
[ "$xchanged" = "y" ] || rm -Rf "$tmpromdel" || :
[ "$xchanged" = "y" ] || return 0
@@ -476,16 +476,11 @@ insert()
modify_mac()
{
- [ -n "$CONFIG_GBE_BIN_PATH" ] || return 1
-
x_ cp "${CONFIG_GBE_BIN_PATH##*../}" "$xbmklocal/gbe"
[ -n "$new_mac" ] && [ "$new_mac" != "restore" ] && \
x_ "$nvm" "$xbmklocal/gbe" setmac "$new_mac"
fx_ newmac x_ find "$tmpromdir" -maxdepth 1 -type f -name "*.rom"
-
- printf "\nGbE NVM written to '%s':\n" "$archive"
- x_ "$nvm" "$xbmklocal/gbe" dump | grep -v "bytes read from file" || :
}
newmac()