#!/usr/bin/env python3
import sys
import subprocess

if __name__ == "__main__":
    if len(sys.argv) < 7:
        print("Usage: python RestaurarImagen.py <disk> <partition> <image_name> <ip> <protocol> <protocol_options> [additional_args...]")
        sys.exit(1)

    disk = sys.argv[1]
    partition = sys.argv[2]
    image_name = sys.argv[3]
    ip = sys.argv[4]
    protocol = sys.argv[5]
    protocol_options = sys.argv[6]
    additional_args = sys.argv[7:]

    exit_code = deploy_image(ip, image_name, disk, partition, protocol, protocol_options, *additional_args)
    sys.exit(exit_code)
