From ae5f9b08c4a670d2c020923a042fdcbaa5c2a1d6 Mon Sep 17 00:00:00 2001 From: advaithm Date: Sun, 4 Apr 2021 07:33:17 +0530 Subject: updated guided.py to allow network manager as nic --- examples/guided.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples/guided.py') diff --git a/examples/guided.py b/examples/guided.py index f374a41c..ec66e892 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -317,7 +317,8 @@ def perform_installation(device, boot_partition, language, mirrors): # Perform a copy of the config if archinstall.arguments.get('nic', None) == 'Copy ISO network configuration to installation': installation.copy_ISO_network_config(enable_services=True) # Sources the ISO network configuration to the install medium. - + elif archinstall.arguments.get('NetworkManager',None) == True: + installation.enable_service('NetworkManager.service') # Otherwise, if a interface was selected, configure that interface elif archinstall.arguments.get('nic', None): installation.configure_nic(**archinstall.arguments.get('nic', {})) -- cgit v1.2.3-70-g09d2 From 9e3ded83119df6a5f2b470ee648754869d4eb824 Mon Sep 17 00:00:00 2001 From: advaithm Date: Sun, 4 Apr 2021 08:54:35 +0530 Subject: install networkmanager, if required --- examples/guided.py | 1 + 1 file changed, 1 insertion(+) (limited to 'examples/guided.py') diff --git a/examples/guided.py b/examples/guided.py index ec66e892..5ca45008 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -318,6 +318,7 @@ def perform_installation(device, boot_partition, language, mirrors): if archinstall.arguments.get('nic', None) == 'Copy ISO network configuration to installation': installation.copy_ISO_network_config(enable_services=True) # Sources the ISO network configuration to the install medium. elif archinstall.arguments.get('NetworkManager',None) == True: + installation.add_additional_packages("networkmanager") installation.enable_service('NetworkManager.service') # Otherwise, if a interface was selected, configure that interface elif archinstall.arguments.get('nic', None): -- cgit v1.2.3-70-g09d2 From 9daa3f49242227e0cc6c2272b9322578edaab644 Mon Sep 17 00:00:00 2001 From: advaithm Date: Sun, 4 Apr 2021 09:26:28 +0530 Subject: fixed some typos and changed up how we detect if we have to enable/install network manager --- archinstall/lib/user_interaction.py | 4 ++-- examples/guided.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/guided.py') diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index 83e59e90..f8b4d9c5 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -94,11 +94,11 @@ def ask_to_configure_network(): # Optionally configure one network interface. #while 1: # {MAC: Ifname} - interfaces = {'ISO-CONFIG' : 'Copy ISO network configuration to installation','NetworkManager':'Use NetworkManager to control and manage you internet conntetion', **list_interfaces()} + interfaces = {'ISO-CONFIG' : 'Copy ISO network configuration to installation','NetworkManager':'Use NetworkManager to control and manage your internet connection', **list_interfaces()} nic = generic_select(interfaces.values(), "Select one network interface to configure (leave blank to skip): ") if nic and nic != 'Copy ISO network configuration to installation': - if nic == 'Use NetworkManager to control and manage you internet conntetion': + if nic == 'Use NetworkManager to control and manage your internet connection': return {'nic': nic,'NetworkManager':True} mode = generic_select(['DHCP (auto detect)', 'IP (static)'], f"Select which mode to configure for {nic}: ") if mode == 'IP (static)': diff --git a/examples/guided.py b/examples/guided.py index 5ca45008..1e077169 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -317,7 +317,7 @@ def perform_installation(device, boot_partition, language, mirrors): # Perform a copy of the config if archinstall.arguments.get('nic', None) == 'Copy ISO network configuration to installation': installation.copy_ISO_network_config(enable_services=True) # Sources the ISO network configuration to the install medium. - elif archinstall.arguments.get('NetworkManager',None) == True: + elif archinstall.arguments.get('nic',None) == 'Use NetworkManager to control and manage your internet connection': installation.add_additional_packages("networkmanager") installation.enable_service('NetworkManager.service') # Otherwise, if a interface was selected, configure that interface -- cgit v1.2.3-70-g09d2 From 8ad4a7d1c42ec5aaf665d4f769cc4860780225d2 Mon Sep 17 00:00:00 2001 From: Advaith Madhukar Date: Sun, 4 Apr 2021 14:42:19 +0530 Subject: fixed network manager check --- examples/guided.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/guided.py') diff --git a/examples/guided.py b/examples/guided.py index 1e077169..1a1cf84c 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -317,7 +317,7 @@ def perform_installation(device, boot_partition, language, mirrors): # Perform a copy of the config if archinstall.arguments.get('nic', None) == 'Copy ISO network configuration to installation': installation.copy_ISO_network_config(enable_services=True) # Sources the ISO network configuration to the install medium. - elif archinstall.arguments.get('nic',None) == 'Use NetworkManager to control and manage your internet connection': + elif archinstall.arguments.get('nic',{}).get('NetworkManager',False): installation.add_additional_packages("networkmanager") installation.enable_service('NetworkManager.service') # Otherwise, if a interface was selected, configure that interface @@ -347,4 +347,4 @@ def perform_installation(device, boot_partition, language, mirrors): ask_user_questions() -perform_installation_steps() \ No newline at end of file +perform_installation_steps() -- cgit v1.2.3-70-g09d2