mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-24 18:27:10 +00:00
scripts: Change here document delimiters
Fix the outstanding scripts using non standard shell here document delimiters. This should have been caught by https://github.com/kata-containers/tests/pull/3937, but there is a bug in the checker which is fixed on https://github.com/kata-containers/tests/pull/4569. Fixes: #3864. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
@@ -72,7 +72,7 @@ readonly mem_boundary_mb=128
|
||||
source "${lib_file}"
|
||||
|
||||
usage() {
|
||||
cat <<EOT
|
||||
cat <<EOF
|
||||
Usage: ${script_name} [options] <rootfs-dir>
|
||||
This script will create a Kata Containers image file of
|
||||
an adequate size based on the <rootfs-dir> directory.
|
||||
@@ -117,7 +117,7 @@ Kernels and hypervisors that support DAX/NVDIMM read the MBR #2, otherwise MBR #
|
||||
[1] - https://github.com/kata-containers/kata-containers/blob/main/tools/osbuilder/image-builder/nsdax.gpl.c
|
||||
[2] - https://github.com/torvalds/linux/blob/master/drivers/nvdimm/pfn.h
|
||||
|
||||
EOT
|
||||
EOF
|
||||
}
|
||||
|
||||
|
||||
|
@@ -23,7 +23,7 @@ AGENT_INIT=${AGENT_INIT:-no}
|
||||
usage()
|
||||
{
|
||||
error="${1:-0}"
|
||||
cat <<EOT
|
||||
cat <<EOF
|
||||
Usage: ${script_name} [options] <rootfs-dir>
|
||||
This script creates a Kata Containers initrd image file based on the
|
||||
<rootfs-dir> directory.
|
||||
@@ -38,7 +38,7 @@ Extra environment variables:
|
||||
DEFAULT: kata-agent
|
||||
AGENT_INIT: use kata agent as init process
|
||||
DEFAULT: no
|
||||
EOT
|
||||
EOF
|
||||
exit "${error}"
|
||||
}
|
||||
|
||||
|
@@ -63,7 +63,7 @@ typeset init=
|
||||
usage()
|
||||
{
|
||||
error="${1:-0}"
|
||||
cat <<EOT
|
||||
cat <<EOF
|
||||
|
||||
Usage: ${script_name} [options] [DISTRO]
|
||||
|
||||
@@ -143,7 +143,7 @@ Refer to the Platform-OS Compatibility Matrix for more details on the supported
|
||||
architectures:
|
||||
https://github.com/kata-containers/kata-containers/tree/main/tools/osbuilder#platform-distro-compatibility-matrix
|
||||
|
||||
EOT
|
||||
EOF
|
||||
exit "${error}"
|
||||
}
|
||||
|
||||
@@ -473,7 +473,7 @@ setup_rootfs()
|
||||
local unitFile="./etc/systemd/system/tmp.mount"
|
||||
info "Install tmp.mount in ./etc/systemd/system"
|
||||
mkdir -p `dirname "$unitFile"`
|
||||
cp ./usr/share/systemd/tmp.mount "$unitFile" || cat > "$unitFile" << EOT
|
||||
cp ./usr/share/systemd/tmp.mount "$unitFile" || cat > "$unitFile" << EOF
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
@@ -496,7 +496,7 @@ What=tmpfs
|
||||
Where=/tmp
|
||||
Type=tmpfs
|
||||
Options=mode=1777,strictatime,nosuid,nodev
|
||||
EOT
|
||||
EOF
|
||||
fi
|
||||
|
||||
popd >> /dev/null
|
||||
@@ -519,12 +519,12 @@ EOT
|
||||
esac
|
||||
|
||||
info "Configure chrony file ${chrony_conf_file}"
|
||||
cat >> "${chrony_conf_file}" <<EOT
|
||||
cat >> "${chrony_conf_file}" <<EOF
|
||||
refclock PHC /dev/ptp0 poll 3 dpoll -2 offset 0
|
||||
# Step the system clock instead of slewing it if the adjustment is larger than
|
||||
# one second, at any time
|
||||
makestep 1 -1
|
||||
EOT
|
||||
EOF
|
||||
|
||||
# Comment out ntp sources for chrony to be extra careful
|
||||
# Reference: https://chrony.tuxfamily.org/doc/3.4/chrony.conf.html
|
||||
|
@@ -168,7 +168,7 @@ create_summary_file()
|
||||
local -r agentdir="${script_dir}/../../../"
|
||||
local -r agent_version=$(cat ${agentdir}/VERSION)
|
||||
|
||||
cat >"$file"<<-EOT
|
||||
cat >"$file"<<-EOF
|
||||
---
|
||||
osbuilder:
|
||||
url: "${osbuilder_url}"
|
||||
@@ -190,7 +190,7 @@ ${extra}
|
||||
name: "${AGENT_BIN}"
|
||||
version: "${agent_version}"
|
||||
agent-is-init-daemon: "${AGENT_INIT}"
|
||||
EOT
|
||||
EOF
|
||||
|
||||
local rootfs_file="${file_dir}/$(basename "${file}")"
|
||||
info "Created summary file '${rootfs_file}' inside rootfs"
|
||||
|
@@ -53,7 +53,7 @@ source "${project_dir}/scripts/lib.sh"
|
||||
|
||||
usage()
|
||||
{
|
||||
cat <<EOT
|
||||
cat <<EOF
|
||||
Usage: $script_name [options] [command | <distro>]
|
||||
|
||||
Options:
|
||||
@@ -72,7 +72,7 @@ Otherwise, tests are run on all distros.
|
||||
$(basename ${test_config}) includes a list of distros to exclude from testing,
|
||||
depending on the detected test environment. However, when a <distro> is specified,
|
||||
distro exclusion based on $(basename ${test_config}) is not enforced.
|
||||
EOT
|
||||
EOF
|
||||
}
|
||||
|
||||
# Add an entry to the specified stats file
|
||||
|
Reference in New Issue
Block a user