diff options
author | Ratan Gupta <ratagupt@in.ibm.com> | 2017-12-06 15:51:37 +0300 |
---|---|---|
committer | Ratan Gupta <ratagupt@in.ibm.com> | 2017-12-06 16:07:01 +0300 |
commit | 9274d017f23da2574f8aedc185399f91168c799d (patch) | |
tree | 0ded6c549360f601328e635b3eb088ef4f325fb1 /meta-phosphor | |
parent | 868bdeea79de4889fc602dedd580fc88a6c7defc (diff) | |
download | openbmc-9274d017f23da2574f8aedc185399f91168c799d.tar.xz |
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')
-rw-r--r-- | meta-phosphor/classes/obmc-phosphor-discovery-service.bbclass | 12 |
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() |