forked from kata-containers/kata-containers
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kata-containers#4987 from ryansavino/initrd-fixes-…
…for-ubuntu-systemd Initrd fixes for ubuntu systemd
- Loading branch information
Showing
1 changed file
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -520,6 +520,11 @@ EOF | |
chrony_conf_file="${ROOTFS_DIR}/etc/chrony/chrony.conf" | ||
chrony_systemd_service="${ROOTFS_DIR}/lib/systemd/system/chrony.service" | ||
;; | ||
"ubuntu") | ||
# Fix for #4932 - Boot hang at: "A start job is running for /dev/ttyS0" | ||
mkdir -p "${ROOTFS_DIR}/etc/systemd/system/getty.target.wants" | ||
ln -sf "/lib/systemd/system/[email protected]" "${ROOTFS_DIR}/etc/systemd/system/getty.target.wants/[email protected]" | ||
;; | ||
*) | ||
chrony_conf_file="${ROOTFS_DIR}/etc/chrony.conf" | ||
chrony_systemd_service="${ROOTFS_DIR}/usr/lib/systemd/system/chronyd.service" | ||
|
@@ -599,7 +604,13 @@ EOF | |
[ -x "${AGENT_DEST}" ] || die "${AGENT_DEST} is not installed in ${ROOTFS_DIR}" | ||
OK "Agent installed" | ||
|
||
[ "${AGENT_INIT}" == "yes" ] && setup_agent_init "${AGENT_DEST}" "${init}" | ||
if [ "${AGENT_INIT}" == "yes" ]; then | ||
setup_agent_init "${AGENT_DEST}" "${init}" | ||
else | ||
# Setup systemd service for kata-agent | ||
mkdir -p "${ROOTFS_DIR}/etc/systemd/system/basic.target.wants" | ||
ln -sf "/usr/lib/systemd/system/kata-containers.target" "${ROOTFS_DIR}/etc/systemd/system/basic.target.wants/kata-containers.target" | ||
fi | ||
|
||
info "Check init is installed" | ||
[ -x "${init}" ] || [ -L "${init}" ] || die "/sbin/init is not installed in ${ROOTFS_DIR}" | ||
|