2024-11-04 04:37:29 +03:00
|
|
|
{ ... }: {
|
|
|
|
text = ''
|
|
|
|
# Fix when ethernet mistakenly detects 100 Mb instead of 1000 Mb.
|
|
|
|
# SPEED is one of 10/100/1000 etc.
|
|
|
|
# Usage: fix_ethernet_speed <DEVICE> <SPEED>
|
|
|
|
function fix_ethernet_speed() {
|
|
|
|
local device="''${1}"
|
|
|
|
local speed="''${2}"
|
2024-04-06 03:03:58 +03:00
|
|
|
|
2024-11-04 04:37:29 +03:00
|
|
|
if [[ "''${device}" = "" || "''${speed}" = "" ]]; then
|
|
|
|
help fix_ethernet_speed
|
|
|
|
return 2
|
|
|
|
fi
|
2024-04-06 03:03:58 +03:00
|
|
|
|
2024-11-04 04:37:29 +03:00
|
|
|
ethtool -s "''${device}" speed "''${speed}"
|
|
|
|
}
|
2024-04-06 03:03:58 +03:00
|
|
|
|
2024-11-04 04:37:29 +03:00
|
|
|
# Delete lost Gradle lock files.
|
|
|
|
function fix_gradle_lock() {
|
|
|
|
cd "''${HOME}/.gradle" && find -type f | grep \\.lock$ | xargs -- rm
|
|
|
|
cd -
|
|
|
|
}
|
|
|
|
'';
|
2024-04-06 03:03:58 +03:00
|
|
|
}
|