meta-facebook: default to restore power policy for Facebook.
Facebook systems should default to "Restore" for RestorePolicy.
This will ensure a system is automatically restored to the last
state prior to the power loss.
Tested: Built Facebook image and verified generated source file
had correct default in it.
Signed-off-by: Karthikeyan Pasupathi <pkarthikeyan1509@gmail.com>
Change-Id: Ifccec4ef88ca8fe01e7d90a57af2411db3311736
diff --git a/meta-facebook/recipes-phosphor/settings/phosphor-settings-defaults-native.bbappend b/meta-facebook/recipes-phosphor/settings/phosphor-settings-defaults-native.bbappend
new file mode 100644
index 0000000..68c1d6c
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/settings/phosphor-settings-defaults-native.bbappend
@@ -0,0 +1,4 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://fb_host_settings.override.yml"
+SETTINGS_HOST_TEMPLATES:append = " fb_host_settings.override.yml"
diff --git a/meta-facebook/recipes-phosphor/settings/phosphor-settings-defaults-native/fb_host_settings.override.yml b/meta-facebook/recipes-phosphor/settings/phosphor-settings-defaults-native/fb_host_settings.override.yml
new file mode 100644
index 0000000..490af9b
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/settings/phosphor-settings-defaults-native/fb_host_settings.override.yml
@@ -0,0 +1,7 @@
+/xyz/openbmc_project/control/host{}/power_restore_policy:
+ - Interface: xyz.openbmc_project.Control.Power.RestorePolicy
+ Properties:
+ PowerRestorePolicy:
+ Default: RestorePolicy::Policy::Restore
+ PowerRestoreDelay:
+ Default: 0