From d31991a67f16f9b371d239e1cfae2ac9941bce9d Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 15 Sep 2018 15:24:59 -0600 Subject: [PATCH] Always load broadcom before tg3 * Hopefully won't cause any problems. --- .bin/Scripts/functions/network.py | 19 ------------------- .../airootfs/etc/modprobe.d/broadcom.conf | 1 + 2 files changed, 1 insertion(+), 19 deletions(-) create mode 100644 .linux_items/include/airootfs/etc/modprobe.d/broadcom.conf diff --git a/.bin/Scripts/functions/network.py b/.bin/Scripts/functions/network.py index 3f3480f5..d040e343 100644 --- a/.bin/Scripts/functions/network.py +++ b/.bin/Scripts/functions/network.py @@ -37,18 +37,6 @@ def connect_to_network(): message = 'Connecting to {}...'.format(WIFI_SSID), function = run_program, cmd = cmd) - - # LAN - if not is_connected(): - # Reload the tg3/broadcom driver (known fix for some Dell systems) - try_and_print(message='Reloading drivers...', function=reload_tg3) - - # Rebuild conkyrc - shutil.copyfile( - '/etc/skel/.conkyrc', - '{HOME}/.conkyrc'.format(**global_vars['Env'])) - cmd = ['{HOME}/.update_conky'.format(**global_vars['Env'])] - run_program(cmd, check=False) def is_connected(): """Check for a valid private IP.""" @@ -79,13 +67,6 @@ def speedtest(): output = [(a, float(b), c) for a, b, c in output] return ['{:10}{:6.2f} {}'.format(*line) for line in output] -def reload_tg3(): - """Reload tg3 module as a workaround for some Dell systems.""" - run_program(['sudo', 'modprobe', '-r', 'tg3']) - run_program(['sudo', 'modprobe', 'broadcom']) - run_program(['sudo', 'modprobe', 'tg3']) - sleep(5) - if __name__ == '__main__': print("This file is not meant to be called directly.") diff --git a/.linux_items/include/airootfs/etc/modprobe.d/broadcom.conf b/.linux_items/include/airootfs/etc/modprobe.d/broadcom.conf new file mode 100644 index 00000000..1c85cd7b --- /dev/null +++ b/.linux_items/include/airootfs/etc/modprobe.d/broadcom.conf @@ -0,0 +1 @@ +softdep tg3 pre: broadcom