initscripts: avoid service dependency in mountnfs.sh
PATCH 1/1 initscripts: avoid service dependency in mountnfs.sh
mountnfs.sh uses "service rpcbind status" only to avoid starting rpcbind twice before mounting remote filesystems. That pulls init-system-helpers-service into images solely to provide /usr/sbin/service.
Use start-stop-daemon test mode for the rpcbind status check instead. The script already uses start-stop-daemon to start rpcbind, so this keeps the duplicate-start protection without requiring the Debian service wrapper.
With mountnfs.sh no longer invoking service, drop init-system-helpers-service from the initscripts runtime dependencies.
Signed-off-by Shinu Chandran <[email protected]>
--- meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh | 3 +-- meta/recipes-core/initscripts/initscripts_1.0.bb | 1 - 2 files changed, 1 insertion(+), 3 deletions(-)
meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh +1 -2
@@ -71,8 +71,7 @@ if test "$rpcbind" = yes then if test -x /usr/sbin/rpcbind then - service rpcbind status > /dev/null - if [ $? != 0 ]; then + if ! start-stop-daemon --stop --test --quiet --exec /usr/sbin/rpcbind; then echo -n "Starting rpcbind..." start-stop-daemon --start --quiet --exec /usr/sbin/rpcbind sleep 2
meta/recipes-core/initscripts/initscripts_1.0.bb +0 -1
@@ -45,7 +45,6 @@ DEPENDS:append = " update-rc.d-native" PACKAGES =+ "${PN}-functions ${PN}-sushell" RDEPENDS:${PN} = "initd-functions \ ${@bb.utils.contains('DISTRO_FEATURES','selinux','${PN}-sushell','',d)} \ - init-system-helpers-service \ " # Recommend pn-functions so that it will be a preferred default provider for initd-functions RRECOMMENDS:${PN} = "${PN}-functions"
Signature · 1 line
2.35.6