20 lines
548 B
Bash
20 lines
548 B
Bash
# fix when ethernet mistakenly detects 100 Mb instead of 1000 Mb.
|
|
# usage: fix_ethernet_speed <DEVICE> <SPEED>
|
|
# SPEED is one of 10/100/1000 etc.
|
|
fix_ethernet_speed()
|
|
{
|
|
local device="${1}"
|
|
local speed="${2}"
|
|
|
|
if [[ "${device}" = "" || "${speed}" = "" ]]; then
|
|
echo "usage: fix_ethernet_speed <DEVICE> <SPEED>"
|
|
return 2
|
|
fi
|
|
|
|
ethtool -s "${device}" speed "${speed}"
|
|
}
|
|
|
|
# fix files wrong sftp password.
|
|
# alias fix_files_sftp="secret-tool clear protocol sftp server 192.168.1.2"
|
|
alias fix_files_sftp="secret-tool clear protocol sftp"
|