Ejemplo n.º 1
0
                    ' * Profile\'s preparation requirements was not fulfilled.',
                    bg='black',
                    fg='red')
                exit(1)

    # Additional packages (with some light weight error handling for invalid package names)
    if not archinstall.arguments.get('packages', None):
        archinstall.arguments['packages'] = [
            package for package in input(
                'Write additional packages to install (space separated, leave blank to skip): '
            ).split(' ') if len(package)
        ]

    # Verify packages that were given
    try:
        archinstall.validate_package_list(archinstall.arguments['packages'])
    except archinstall.RequirementError as e:
        archinstall.log(e, fg='red')
        exit(1)

    # Ask or Call the helper function that asks the user to optionally configure a network.
    if not archinstall.arguments.get('nic', None):
        archinstall.arguments['nic'] = archinstall.ask_to_configure_network()
        if not archinstall.arguments['nic']:
            archinstall.log(
                f"No network configuration was selected. Network is going to be unavailable until configured manually!",
                fg="yellow")

    if not archinstall.arguments.get('timezone', None):
        archinstall.arguments['timezone'] = archinstall.ask_for_a_timezone()
Ejemplo n.º 2
0
        break

# Additional packages (with some light weight error handling for invalid package names)
archinstall.storage['_guided']['packages'] = None
while 1:
    packages = [
        package for package in input(
            'Additional packages aside from base (space separated): ').split(
                ' ') if len(package)
    ]

    if not packages:
        break

    try:
        if archinstall.validate_package_list(packages):
            archinstall.storage['_guided']['packages'] = packages
            break
    except archinstall.RequirementError as e:
        print(e)

# Optionally configure one network interface.
#while 1:
# {MAC: Ifname}
interfaces = {
    'ISO-CONFIG': 'Copy ISO network configuration to installation',
    **archinstall.list_interfaces()
}
archinstall.storage['_guided']['network'] = None

nic = archinstall.generic_select(