From: Waldemar Kozaczuk <[email protected]> Committer: Waldemar Kozaczuk <[email protected]> Branch: master
scripts: make firecracker.py default to host architecture Signed-off-by: Waldemar Kozaczuk <[email protected]> --- diff --git a/scripts/firecracker.py b/scripts/firecracker.py --- a/scripts/firecracker.py +++ b/scripts/firecracker.py @@ -14,13 +14,14 @@ import tempfile from datetime import datetime - verbose = False stty_params = None devnull = open('/dev/null', 'w') +host_arch = subprocess.check_output(["uname", "-m"]).decode('utf-8').split('\n')[0] + def stty_save(): global stty_params p = subprocess.Popen(["stty", "-g"], stdout=subprocess.PIPE, stderr=devnull) @@ -381,7 +382,7 @@ def main(options): help="use socket-based API to configure and start OSv on firecracker") parser.add_argument("-p", "--physical_nic", action="store", default=None, help="name of the physical NIC (wired or wireless) to forward to if in natted mode") - parser.add_argument("--arch", action="store", choices=["x86_64","aarch64"], default="x86_64", + parser.add_argument("--arch", action="store", choices=["x86_64","aarch64"], default=host_arch, help="specify Firecracker architecture: x86_64, aarch64") cmd_args = parser.parse_args() -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/00000000000029941605aaebdd6c%40google.com.
