mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-08 05:26:58 +02:00
fix(disk_layout_util.sh): Fix changing build_image's disk layout.
Previously the code in base_image_util.sh properly handled the disk layout command line flag but the spaghetti code later on calls a function from disk_layout_util.sh which only returned 'base' resulting in a bit of a mess if something other than 'base' is used. Sync up the two code paths to avoid that...
This commit is contained in:
parent
d5a19a0700
commit
b5816f7a8d
@ -39,11 +39,9 @@ cleanup_mounts() {
|
||||
create_base_image() {
|
||||
local image_name=$1
|
||||
local rootfs_verification_enabled=$2
|
||||
local image_type="base"
|
||||
|
||||
if [[ "${FLAGS_disk_layout}" != "default" ]]; then
|
||||
image_type="${FLAGS_disk_layout}"
|
||||
fi
|
||||
get_disk_layout_type
|
||||
local image_type="${DISK_LAYOUT_TYPE}"
|
||||
|
||||
check_valid_layout "base"
|
||||
check_valid_layout ${image_type}
|
||||
|
@ -112,6 +112,10 @@ check_valid_layout() {
|
||||
|
||||
get_disk_layout_type() {
|
||||
DISK_LAYOUT_TYPE="base"
|
||||
if [[ -n "${FLAGS_disk_layout}" && \
|
||||
"${FLAGS_disk_layout}" != "default" ]]; then
|
||||
DISK_LAYOUT_TYPE="${FLAGS_disk_layout}"
|
||||
fi
|
||||
}
|
||||
|
||||
emit_gpt_scripts() {
|
||||
|
Loading…
Reference in New Issue
Block a user