Skip to content

Commit

Permalink
createdisk: add -r option to scp to copy directories
Browse files Browse the repository at this point in the history
arm64 contains some dirs in the ostree content
  • Loading branch information
Prashanth684 authored and praveenkumar committed Sep 1, 2021
1 parent ee4e994 commit b0db53d
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions createdisk.sh
Expand Up @@ -76,17 +76,20 @@ ${SSH} core@api.${CRC_VM_NAME}.${BASE_DOMAIN} -- 'sudo chown core.core ~/.ssh/au
shutdown_vm ${VM_PREFIX}
start_vm ${VM_PREFIX}

# Get the rhcos ostree Hash ID
ostree_hash=$(${SSH} core@api.${CRC_VM_NAME}.${BASE_DOMAIN} -- "cat /proc/cmdline | grep -oP \"(?<=${BASE_OS}-).*(?=/vmlinuz)\"")
# Only used for hyperkit bundle generation
if [ -n "${SNC_GENERATE_MACOS_BUNDLE}" ]; then
# Get the rhcos ostree Hash ID
ostree_hash=$(${SSH} core@api.${CRC_VM_NAME}.${BASE_DOMAIN} -- "cat /proc/cmdline | grep -oP \"(?<=${BASE_OS}-).*(?=/vmlinuz)\"")

# Get the rhcos kernel release
kernel_release=$(${SSH} core@api.${CRC_VM_NAME}.${BASE_DOMAIN} -- 'uname -r')
# Get the rhcos kernel release
kernel_release=$(${SSH} core@api.${CRC_VM_NAME}.${BASE_DOMAIN} -- 'uname -r')

# Get the kernel command line arguments
kernel_cmd_line=$(${SSH} core@api.${CRC_VM_NAME}.${BASE_DOMAIN} -- 'cat /proc/cmdline')
# Get the kernel command line arguments
kernel_cmd_line=$(${SSH} core@api.${CRC_VM_NAME}.${BASE_DOMAIN} -- 'cat /proc/cmdline')

# SCP the vmlinuz/initramfs from VM to Host in provided folder.
${SCP} core@api.${CRC_VM_NAME}.${BASE_DOMAIN}:/boot/ostree/${BASE_OS}-${ostree_hash}/* $1
# SCP the vmlinuz/initramfs from VM to Host in provided folder.
${SCP} -r core@api.${CRC_VM_NAME}.${BASE_DOMAIN}:/boot/ostree/${BASE_OS}-${ostree_hash}/* $1
fi

# Add internalIP as node IP for kubelet systemd unit file
# More details at https://bugzilla.redhat.com/show_bug.cgi?id=1872632
Expand Down

0 comments on commit b0db53d

Please sign in to comment.