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.
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