forked from mirrors/nixpkgs
create-amis.sh: fix typo
This commit is contained in:
parent
2d67b946b7
commit
1c0a20efcf
|
@ -104,8 +104,8 @@ in {
|
|||
${pkgs.jq}/bin/jq -n \
|
||||
--arg system_label ${lib.escapeShellArg config.system.nixos.label} \
|
||||
--arg system ${lib.escapeShellArg pkgs.stdenv.hostPlatform.system} \
|
||||
--arg root_logical_bytes "$(${pkgs.qemu}/bin/qemu-img info --output json "$bootDisk" | ${pkgs.jq}/bin/jq '."virtual-size"')" \
|
||||
--arg boot_logical_bytes "$(${pkgs.qemu}/bin/qemu-img info --output json "$rootDisk" | ${pkgs.jq}/bin/jq '."virtual-size"')" \
|
||||
--arg root_logical_bytes "$(${pkgs.qemu}/bin/qemu-img info --output json "$rootDisk" | ${pkgs.jq}/bin/jq '."virtual-size"')" \
|
||||
--arg boot_logical_bytes "$(${pkgs.qemu}/bin/qemu-img info --output json "$bootDisk" | ${pkgs.jq}/bin/jq '."virtual-size"')" \
|
||||
--arg root "$rootDisk" \
|
||||
--arg boot "$bootDisk" \
|
||||
'{}
|
||||
|
|
|
@ -69,7 +69,7 @@ image_label="$(read_image_info .label)${zfs_disks:+-ZFS}"
|
|||
image_system=$(read_image_info .system)
|
||||
image_files=( $(read_image_info "${zfs_disks:+.disks.root}.file") )
|
||||
|
||||
image_logical_bytes=$(read_image_info "${zfs_disks:+.disks.root}.logical_bytes")
|
||||
image_logical_bytes=$(read_image_info "${zfs_disks:+.disks.boot}.logical_bytes")
|
||||
|
||||
if [[ -n "$zfs_disks" ]]; then
|
||||
image_files+=( $(read_image_info .disks.boot.file) )
|
||||
|
@ -242,10 +242,7 @@ upload_image() {
|
|||
if [[ -n "$zfs_disks" ]]; then
|
||||
local root_snapshot_id=$(read_state "$region.$image_label.root.$image_system" snapshot_id)
|
||||
|
||||
# currently there is a bug in the ZFS AMI derivation, mismatching logical_bytes
|
||||
# root.logical_bytes should be boot.logical_bytes and vice versa
|
||||
# work around until fixed
|
||||
local root_image_logical_bytes=$(read_image_info ".disks.boot.logical_bytes")
|
||||
local root_image_logical_bytes=$(read_image_info ".disks.root.logical_bytes")
|
||||
local root_image_logical_gigabytes=$(((root_image_logical_bytes-1)/1024/1024/1024+1)) # Round to the next GB
|
||||
|
||||
block_device_mappings+=(
|
||||
|
|
Loading…
Reference in a new issue