summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/classes/obmc-phosphor-discovery-service.bbclass
diff options
context:
space:
mode:
authorRatan Gupta <ratagupt@in.ibm.com>2017-12-06 18:21:37 +0530
committerRatan Gupta <ratagupt@in.ibm.com>2017-12-06 18:37:01 +0530
commit9274d017f23da2574f8aedc185399f91168c799d (patch)
tree0ded6c549360f601328e635b3eb088ef4f325fb1 /meta-phosphor/classes/obmc-phosphor-discovery-service.bbclass
parent868bdeea79de4889fc602dedd580fc88a6c7defc (diff)
downloadtalos-openbmc-9274d017f23da2574f8aedc185399f91168c799d.tar.gz
talos-openbmc-9274d017f23da2574f8aedc185399f91168c799d.zip
phosphor-discovery: Fixes some conditional check
Correct the return values from string to boolean of distro feature check for avahi and slp. This commit also correct the check if slp and avahi is not enabled then return Change-Id: I2a19c14fdaf19523702062e6466d636080eeabe6 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
Diffstat (limited to 'meta-phosphor/classes/obmc-phosphor-discovery-service.bbclass')
-rw-r--r--meta-phosphor/classes/obmc-phosphor-discovery-service.bbclass12
1 files changed, 6 insertions, 6 deletions
diff --git a/meta-phosphor/classes/obmc-phosphor-discovery-service.bbclass b/meta-phosphor/classes/obmc-phosphor-discovery-service.bbclass
index 73a4875df..313402ff3 100644
--- a/meta-phosphor/classes/obmc-phosphor-discovery-service.bbclass
+++ b/meta-phosphor/classes/obmc-phosphor-discovery-service.bbclass
@@ -3,12 +3,12 @@ DISCOVERY_SVC_PACKAGES ?= "${PN}"
python() {
avahi_enabled = bb.utils.contains(
- 'DISTRO_FEATURES', 'avahi', 'true', 'false', d)
+ 'DISTRO_FEATURES', 'avahi', True, False, d)
slp_enabled = bb.utils.contains(
- 'DISTRO_FEATURES', 'slp', 'true', 'false', d)
+ 'DISTRO_FEATURES', 'slp', True, False, d)
- if not avahi_enabled and slp_enabled:
+ if not avahi_enabled and not slp_enabled:
return
syscnfdir = d.getVar('sysconfdir', True)
@@ -48,11 +48,11 @@ python() {
python discovery_services_postinstall() {
avahi_enabled = bb.utils.contains(
- 'DISTRO_FEATURES', 'avahi', 'true', 'false', d)
+ 'DISTRO_FEATURES', 'avahi', True, False, d)
slp_enabled = bb.utils.contains(
- 'DISTRO_FEATURES', 'slp', 'true', 'false', d)
+ 'DISTRO_FEATURES', 'slp', True, False, d)
- if not avahi_enabled and slp_enabled:
+ if not avahi_enabled and not slp_enabled:
return
avahi_service_dir = d.getVar('AVAHI_SERVICES_DIR', True).strip()
OpenPOWER on IntegriCloud