Add dependency on settings D-Bus objects

Change-Id: I0e7e84f191f6a466b0f84c6d4f490816331f141f
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/common/recipes-phosphor/datetime/phosphor-time-manager/org.openbmc.TimeManager.service b/common/recipes-phosphor/datetime/phosphor-time-manager/org.openbmc.TimeManager.service
index 3555814..b294608 100644
--- a/common/recipes-phosphor/datetime/phosphor-time-manager/org.openbmc.TimeManager.service
+++ b/common/recipes-phosphor/datetime/phosphor-time-manager/org.openbmc.TimeManager.service
@@ -1,9 +1,11 @@
 [Unit]
 Description=Phosphor Time Manager daemon
+Wants=mapper-wait@-xyz-openbmc_project-time-owner.service
+After=mapper-wait@-xyz-openbmc_project-time-owner.service
+Wants=mapper-wait@-xyz-openbmc_project-time-sync_method.service
+After=mapper-wait@-xyz-openbmc_project-time-sync_method.service
 Wants=mapper-wait@-org-openbmc-NetworkManager-Interface.service
 After=mapper-wait@-org-openbmc-NetworkManager-Interface.service
-Wants=mapper-wait@-org-openbmc-settings-host0.service
-After=mapper-wait@-org-openbmc-settings-host0.service
 Wants=mapper-wait@-org-openbmc-control-power0.service
 After=mapper-wait@-org-openbmc-control-power0.service
 
diff --git a/common/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service b/common/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service
index febbe87..aec95b8 100644
--- a/common/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service
+++ b/common/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service
@@ -1,7 +1,17 @@
 [Unit]
 Description=Phosphor Inband IPMI
+# TODO openbmc/openbmc#2059 - The wants/after below should be based on providers
+Wants=mapper-wait@-xyz-openbmc_project-control-host0-boot_mode.service
+After=mapper-wait@-xyz-openbmc_project-control-host0-boot_mode.service
+Wants=mapper-wait@-xyz-openbmc_project-control-host0-boot_source.service
+After=mapper-wait@-xyz-openbmc_project-control-host0-boot_source.service
+Wants=mapper-wait@-xyz-openbmc_project-control-host0-power_restore_policy.service
+After=mapper-wait@-xyz-openbmc_project-control-host0-power_restore_policy.service
+Wants=mapper-wait@-xyz-openbmc_project-control-host0-restriction_mode.service
+After=mapper-wait@-xyz-openbmc_project-control-host0-restriction_mode.service
 Wants=clear-once.service
 After=clear-once.service
+# TODO openbmc/openbmc#2008 - remove wants/after on the old settings below
 Wants=mapper-wait@-org-openbmc-settings-host0.service
 After=mapper-wait@-org-openbmc-settings-host0.service
 
diff --git a/common/recipes-phosphor/ipmi/phosphor-ipmi-net/phosphor-ipmi-net.service b/common/recipes-phosphor/ipmi/phosphor-ipmi-net/phosphor-ipmi-net.service
index 01f51cb..bdda6cc 100644
--- a/common/recipes-phosphor/ipmi/phosphor-ipmi-net/phosphor-ipmi-net.service
+++ b/common/recipes-phosphor/ipmi/phosphor-ipmi-net/phosphor-ipmi-net.service
@@ -1,5 +1,14 @@
 [Unit]
 Description=Network IPMI daemon
+# TODO openbmc/openbmc#2059 - The wants/after below should be based on providers
+Wants=mapper-wait@-xyz-openbmc_project-control-host0-boot_mode.service
+After=mapper-wait@-xyz-openbmc_project-control-host0-boot_mode.service
+Wants=mapper-wait@-xyz-openbmc_project-control-host0-boot_source.service
+After=mapper-wait@-xyz-openbmc_project-control-host0-boot_source.service
+Wants=mapper-wait@-xyz-openbmc_project-control-host0-power_restore_policy.service
+After=mapper-wait@-xyz-openbmc_project-control-host0-power_restore_policy.service
+Wants=mapper-wait@-xyz-openbmc_project-control-host0-restriction_mode.service
+After=mapper-wait@-xyz-openbmc_project-control-host0-restriction_mode.service
 
 [Service]
 ExecStart={sbindir}/netipmid
diff --git a/common/recipes-phosphor/state/files/phosphor-discover-system-state@.service b/common/recipes-phosphor/state/files/phosphor-discover-system-state@.service
index 325e8dc..7dc09d3 100644
--- a/common/recipes-phosphor/state/files/phosphor-discover-system-state@.service
+++ b/common/recipes-phosphor/state/files/phosphor-discover-system-state@.service
@@ -1,7 +1,7 @@
 [Unit]
 Description=Reboot If Enabled
-Wants=mapper-wait@-org-openbmc-settings-host%i.service
-After=mapper-wait@-org-openbmc-settings-host%i.service
+Wants=mapper-wait@-xyz-openbmc_project-control-host0-power_restore_policy.service
+After=mapper-wait@-xyz-openbmc_project-control-host0-power_restore_policy.service
 Wants=mapper-wait@-xyz-openbmc_project-state-host%i.service
 After=mapper-wait@-xyz-openbmc_project-state-host%i.service
 Wants=mapper-wait@-xyz-openbmc_project-state-chassis%i.service
diff --git a/common/recipes-phosphor/state/files/xyz.openbmc_project.State.Host.service b/common/recipes-phosphor/state/files/xyz.openbmc_project.State.Host.service
index 8fd2ed3..3b8551b 100644
--- a/common/recipes-phosphor/state/files/xyz.openbmc_project.State.Host.service
+++ b/common/recipes-phosphor/state/files/xyz.openbmc_project.State.Host.service
@@ -1,5 +1,7 @@
 [Unit]
 Description=Phosphor Host State Manager
+Wants=mapper-wait@-xyz-openbmc_project-control-host0-auto_reboot.service
+After=mapper-wait@-xyz-openbmc_project-control-host0-auto_reboot.service
 Wants=mapper-wait@-org-openbmc-managers-System.service
 After=mapper-wait@-org-openbmc-managers-System.service
 Before=mapper-wait@-xyz-openbmc_project-state-host.service