mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-10 06:26:57 +02:00
build_image: Remove disable_read_write variable
The disable_read_write variable was just a copy of FLAGS_enable_rootfs_verification, so to make things less confusing just use FLAGS_enable_rootfs_verification. Signed-off-by: Geoff Levand <geoff@infradead.org>
This commit is contained in:
parent
f845a97532
commit
a7ffba9a9f
@ -304,9 +304,8 @@ finish_image() {
|
|||||||
local install_grub=0
|
local install_grub=0
|
||||||
local disk_img="${BUILD_DIR}/${image_name}"
|
local disk_img="${BUILD_DIR}/${image_name}"
|
||||||
|
|
||||||
local disable_read_write="${FLAGS_FALSE}"
|
if [[ "${IMAGE_BUILD_TYPE}" != "prod" ]]; then
|
||||||
if [[ "${IMAGE_BUILD_TYPE}" == "prod" ]]; then
|
FLAGS_enable_rootfs_verification=${FLAGS_FALSE}
|
||||||
disable_read_write="${FLAGS_enable_rootfs_verification}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Copy kernel to support dm-verity boots
|
# Copy kernel to support dm-verity boots
|
||||||
@ -355,7 +354,7 @@ finish_image() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Make the filesystem un-mountable as read-write and setup verity.
|
# Make the filesystem un-mountable as read-write and setup verity.
|
||||||
if [[ ${disable_read_write} -eq ${FLAGS_TRUE} ]]; then
|
if [[ ${FLAGS_enable_rootfs_verification} -eq ${FLAGS_TRUE} ]]; then
|
||||||
# Unmount /usr partition
|
# Unmount /usr partition
|
||||||
sudo umount --recursive "${root_fs_dir}/usr" || exit 1
|
sudo umount --recursive "${root_fs_dir}/usr" || exit 1
|
||||||
|
|
||||||
@ -405,7 +404,7 @@ finish_image() {
|
|||||||
target_list="arm64-efi"
|
target_list="arm64-efi"
|
||||||
fi
|
fi
|
||||||
for target in ${target_list}; do
|
for target in ${target_list}; do
|
||||||
if [[ ${disable_read_write} -eq ${FLAGS_TRUE} && ${FLAGS_enable_verity} -eq ${FLAGS_TRUE} ]]; then
|
if [[ ${FLAGS_enable_rootfs_verification} -eq ${FLAGS_TRUE} && ${FLAGS_enable_verity} -eq ${FLAGS_TRUE} ]]; then
|
||||||
${BUILD_LIBRARY_DIR}/grub_install.sh \
|
${BUILD_LIBRARY_DIR}/grub_install.sh \
|
||||||
--board="${BOARD}" \
|
--board="${BOARD}" \
|
||||||
--target="${target}" \
|
--target="${target}" \
|
||||||
|
Loading…
Reference in New Issue
Block a user