From 171eceb426533128816bc57d3e92f32c12531ba6 Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Fri, 18 May 2018 11:04:14 +0100 Subject: [PATCH] image: Use variable for referring to init Use a variable rather than hard-coding the expected init daemon path. Signed-off-by: James O. D. Hunt --- image-builder/image_builder.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/image-builder/image_builder.sh b/image-builder/image_builder.sh index 172d976632..492633f470 100755 --- a/image-builder/image_builder.sh +++ b/image-builder/image_builder.sh @@ -113,8 +113,9 @@ if [ -n "${USE_DOCKER}" ] ; then exit $? fi # The kata rootfs image expect init and kata-agent to be installed -init="${ROOTFS}/sbin/init" -[ -x "${init}" ] || [ -L ${init} ] || die "/sbin/init is not installed in ${ROOTFS}" +init_path="/sbin/init" +init="${ROOTFS}${init_path}" +[ -x "${init}" ] || [ -L ${init} ] || die "${init_path} is not installed in ${ROOTFS}" OK "init is installed" [ "${AGENT_INIT}" == "yes" ] || [ -x "${ROOTFS}/usr/bin/${AGENT_BIN}" ] || \ die "/usr/bin/${AGENT_BIN} is not installed in ${ROOTFS}