rickysarraf / laptop-mode-tools

Power Savings tool for Linux
https://www.researchut.com/tags/laptop-mode-tools/
GNU General Public License v2.0
550 stars 47 forks source link

Fix the bug of incorrect use of DEVICE variable in ethernet #172

Open wxphaha opened 2 years ago

wxphaha commented 2 years ago

Part of the code uses DEVICE before assigning a value to DEVICE, which will cause the condition to be judged incorrectly. For example, if there is another network card NO-CARRIER, it will cause eth0 to be erroneously disabled. Move this part of the code after assigning a value to the DEVICE.

Author: xinpeng.wang wangxinpeng@uniontech.com