summaryrefslogtreecommitdiffstats
path: root/pyflashbmc
diff options
context:
space:
mode:
authorMilton Miller <miltonm@us.ibm.com>2016-06-16 13:11:31 -0500
committerMilton Miller <miltonm@us.ibm.com>2016-06-30 18:22:32 -0500
commitc80941092ca36916c3aa0c6bfb93ec6953a71362 (patch)
treeaeedeb1011362313389494e025a0c69f3c5e0f9f /pyflashbmc
parent332f143ea1305c387ae0611f402a976baaa1b6e1 (diff)
downloadtalos-skeleton-c80941092ca36916c3aa0c6bfb93ec6953a71362.tar.gz
talos-skeleton-c80941092ca36916c3aa0c6bfb93ec6953a71362.zip
bmc_update: save runtime modified u-boot environment
Copy the version saved by our initfs and pointed to by our fw_setenv tools via /etc/fw_setenv. Do this copy by default. The /etc/fw_env.cnf config file points to /run/fw_env in our systems. The bmc_update object was copying /dev/mtd2. That could be very system specific, and it misses any changes made from elsewhere in the system. This variable causes the u-boot environment to be written back after writing the whole image. This will save the ethernet mac which for systems which don't store it elsewhere. Signed-off-by: Milton Miller <miltonm@us.ibm.com>
Diffstat (limited to 'pyflashbmc')
-rw-r--r--pyflashbmc/bmc_update.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyflashbmc/bmc_update.py b/pyflashbmc/bmc_update.py
index 9fa54ac..cd2f3c1 100644
--- a/pyflashbmc/bmc_update.py
+++ b/pyflashbmc/bmc_update.py
@@ -32,7 +32,7 @@ class BmcFlashControl(DbusProperties,DbusObjectManager):
self.Set(DBUS_NAME,"status","Idle")
self.Set(DBUS_NAME,"filename","")
- self.Set(DBUS_NAME,"preserve_network_settings",False)
+ self.Set(DBUS_NAME,"preserve_network_settings",True)
self.Set(DBUS_NAME,"restore_application_defaults",False)
self.Set(DBUS_NAME,"update_kernel_and_apps",False)
self.Set(DBUS_NAME,"clear_persistent_files",False)
@@ -114,7 +114,7 @@ class BmcFlashControl(DbusProperties,DbusObjectManager):
os.unlink(UPDATE_PATH+"/whitelist")
if (self.Get(DBUS_NAME,"preserve_network_settings") == True):
print "Preserving network settings"
- shutil.copy2("/dev/mtd2",UPDATE_PATH+"/image-u-boot-env")
+ shutil.copy2("/run/fw_env",UPDATE_PATH+"/image-u-boot-env")
except Exception as e:
print e
OpenPOWER on IntegriCloud