Allow disabling use of u-boot environment
Not all systems have a writable u-boot environment, so add an autoconf
argument to disable the use of it.
Signed-off-by: Benjamin Fair <benjaminfair@google.com>
Change-Id: I04074c28f81214dd59a974440e51be0da50c5d63
diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp
index 6fc1e2e..f7343ad 100644
--- a/ethernet_interface.cpp
+++ b/ethernet_interface.cpp
@@ -979,12 +979,16 @@
MacAddressIntf::mACAddress(value);
auto interface = interfaceName();
+
+#ifdef HAVE_UBOOT_ENV
auto envVar = interfaceToUbootEthAddr(interface.c_str());
if (envVar)
{
execute("/sbin/fw_setenv", "fw_setenv", envVar->c_str(),
value.c_str());
}
+#endif // HAVE_UBOOT_ENV
+
// TODO: would remove the call below and
// just restart systemd-netwokd
// through https://github.com/systemd/systemd/issues/6696