diff mbox series

[meta-networking,1/5] openl2tp: fix rpcbind status check in run-ptest

Message ID 20261015043859.3073445-1-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-networking,1/5] openl2tp: fix rpcbind status check in run-ptest | expand

Commit Message

Khem Raj Oct. 15, 2026, 4:38 a.m. UTC
The final rpcbind check chained 'which systemctl && systemctl status ||
service rpcbind status', so on sysvinit images without systemctl it fell
back to 'service', which may not exist, and the tests were skipped even
though rpcbind was running. Check the status with the same init system
that was used to start it.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest b/meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest
index a40b6c4228..61158d4519 100644
--- a/meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest
+++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest
@@ -43,11 +43,11 @@  zcat /proc/config.gz | grep CONFIG_PPPOL2TP=m > /dev/null || exit_cus "Failed to
 SYSV_INIT="/etc/init.d/rpcbind"
 if [ -e ${SYSV_INIT} ]; then
 	${SYSV_INIT} status > /dev/null || ${SYSV_INIT} start > /dev/null
+	${SYSV_INIT} status > /dev/null
 else
 	systemctl status rpcbind > /dev/null || systemctl start rpcbind > /dev/null
+	systemctl status rpcbind > /dev/null
 fi
-
-which systemctl > /dev/null && systemctl status rpcbind > /dev/null || service rpcbind status > /dev/null
 [ $? -ne 0 ] && exit_cus "Failed to start rpcbind service, skip the tests." 1

 # backup the below files