This repository has been archived on 2024-03-04. You can view files and clone it, but cannot push or open issues or pull requests.
linux/.config/bash/module/Fix.sh

20 lines
470 B
Bash
Raw Normal View History

2023-12-07 04:02:47 +03:00
# Fix when ethernet mistakenly detects 100 Mb instead of 1000 Mb.
2023-10-30 03:49:10 +03:00
# SPEED is one of 10/100/1000 etc.
2023-12-07 04:02:47 +03:00
# Usage: fix_ethernet_speed <DEVICE> <SPEED>
2023-12-07 01:44:42 +03:00
function fix_ethernet_speed() {
2023-12-05 21:50:45 +03:00
local device="${1}"
local speed="${2}"
2023-08-08 16:24:15 +03:00
2023-12-05 21:50:45 +03:00
if [[ "${device}" = "" || "${speed}" = "" ]]; then
2023-12-07 04:02:47 +03:00
help fix_ethernet_speed
2023-12-05 21:50:45 +03:00
return 2
fi
2023-08-08 16:24:15 +03:00
2023-12-05 21:50:45 +03:00
ethtool -s "${device}" speed "${speed}"
2023-08-08 16:24:15 +03:00
}
2023-12-07 04:02:47 +03:00
# Fix nautilus after typing wrong sftp password.
2023-12-07 01:44:42 +03:00
function fix_files_sftp() {
2023-12-07 00:42:06 +03:00
secret-tool clear protocol sftp
}