mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-31 16:36:38 +00:00
builder: fix agent binary path
kata agent is installed in `${ROOTFS}/usr/bin/` rather than `${ROOTFS}/bin/`. It just happended to work because `bin` is a symlink to `usr/bin`, which might not be true in some distros. So do not rely on it. Signed-off-by: Peng Tao <bergwolf@gmail.com>
This commit is contained in:
@@ -138,8 +138,8 @@ fi
|
||||
init="${ROOTFS}/sbin/init"
|
||||
[ -x "${init}" ] || [ -L ${init} ] || die "/sbin/init is not installed in ${ROOTFS_DIR}"
|
||||
OK "init is installed"
|
||||
[ "${AGENT_INIT}" == "yes" ] || [ -x "${ROOTFS}/bin/${AGENT_BIN}" ] || \
|
||||
die "/bin/${AGENT_BIN} is not installed in ${ROOTFS}
|
||||
[ "${AGENT_INIT}" == "yes" ] || [ -x "${ROOTFS}/usr/bin/${AGENT_BIN}" ] || \
|
||||
die "/usr/bin/${AGENT_BIN} is not installed in ${ROOTFS}
|
||||
use AGENT_BIN env variable to change the expected agent binary name"
|
||||
OK "Agent installed"
|
||||
[ "$(id -u)" -eq 0 ] || die "$0: must be run as root"
|
||||
|
@@ -87,8 +87,8 @@ IMAGE_NAME=$(basename ${INITRD_IMAGE})
|
||||
init="${ROOTFS}/sbin/init"
|
||||
[ -x "${init}" ] || [ -L ${init} ] || die "/sbin/init is not installed in ${ROOTFS_DIR}"
|
||||
OK "init is installed"
|
||||
[ "${AGENT_INIT}" == "yes" ] || [ -x "${ROOTFS}/bin/${AGENT_BIN}" ] || \
|
||||
die "/bin/${AGENT_BIN} is not installed in ${ROOTFS}
|
||||
[ "${AGENT_INIT}" == "yes" ] || [ -x "${ROOTFS}/usr/bin/${AGENT_BIN}" ] || \
|
||||
die "/usr/bin/${AGENT_BIN} is not installed in ${ROOTFS}
|
||||
use AGENT_BIN env variable to change the expected agent binary name"
|
||||
OK "Agent is installed"
|
||||
|
||||
|
@@ -212,10 +212,10 @@ pushd "${GOPATH}/src/${GO_AGENT_PKG}"
|
||||
make INIT=${AGENT_INIT}
|
||||
make install DESTDIR="${ROOTFS_DIR}" INIT=${AGENT_INIT}
|
||||
popd
|
||||
[ -x "${ROOTFS_DIR}/bin/${AGENT_BIN}" ] || die "/bin/${AGENT_BIN} is not installed in ${ROOTFS_DIR}"
|
||||
[ -x "${ROOTFS_DIR}/usr/bin/${AGENT_BIN}" ] || die "/usr/bin/${AGENT_BIN} is not installed in ${ROOTFS_DIR}"
|
||||
OK "Agent installed"
|
||||
|
||||
[ "${AGENT_INIT}" == "yes" ] && setup_agent_init "${ROOTFS_DIR}/bin/${AGENT_BIN}" "${init}"
|
||||
[ "${AGENT_INIT}" == "yes" ] && setup_agent_init "${ROOTFS_DIR}/usr/bin/${AGENT_BIN}" "${init}"
|
||||
|
||||
info "Check init is installed"
|
||||
[ -x "${init}" ] || [ -L ${init} ] || die "/sbin/init is not installed in ${ROOTFS_DIR}"
|
||||
|
Reference in New Issue
Block a user