Skip to content
Snippets Groups Projects
Commit 0a54b6f5 authored by Timmy Chan's avatar Timmy Chan
Browse files

Fix debian image setup x86_64

parent 6902cee8
No related branches found
No related tags found
1 merge request!5Feat/cve linux kernel
......@@ -13,7 +13,7 @@ VERBOSE=1
DL_DIR=$1
#DL_DIR=~/ctf/qemu/debian_disks
ARCH=i386
ARCH=${2:-i386}
DISK_NAME=disk.img
......@@ -103,6 +103,6 @@ EOF
cd "${WORKING_DIR}" || exit
}
download_debian $ARCH
download_debian "$ARCH"
exit
......@@ -46,7 +46,7 @@ def main(*args):
vm_directory = create_vm_directory()
verbose_log("Setup VM image")
setup_vm_disk_image(vm_directory, DEFAULT_ARCH, DEFAULT_OS)
setup_vm_disk_image(vm_directory, **kwargs)
verbose_log("Configuring kernel")
configure_kernel(**kwargs)
......@@ -111,9 +111,10 @@ def create_vm_directory():
return path
def setup_vm_disk_image(parent_dir, arch=DEFAULT_ARCH, _os=DEFAULT_OS):
def setup_vm_disk_image(vm_directory, **kwargs):
args = f"{str(vm_directory)} {kwargs['arch']}"
try:
simple_call_shell_command("bash debian_image_setup.sh " + str(parent_dir))
simple_call_shell_command("bash debian_image_setup.sh " + args)
except subprocess.CalledProcessError as e:
raise Exception("Error in download_vm_disk_image()")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment