[device/accton/as4630-54pe] Fix accton driver not been installed (#6321)
Accton util applies lsmod to check if drivers are installed. But lsmod may return error on startup and skip module installation. Signed-off-by: roy_lee <roy_lee@edge-core.com>
This commit is contained in:
parent
78ad83fe2a
commit
191e90e400
@ -214,10 +214,12 @@ def log_os_system(cmd, show):
|
|||||||
return status, output
|
return status, output
|
||||||
|
|
||||||
def driver_inserted():
|
def driver_inserted():
|
||||||
ret, lsmod = log_os_system("lsmod| grep accton", 0)
|
ret, lsmod = log_os_system("ls /sys/module/*accton*", 0)
|
||||||
logging.info('mods:'+lsmod)
|
logging.info('mods:'+lsmod)
|
||||||
if len(lsmod) ==0:
|
if ret :
|
||||||
return False
|
return False
|
||||||
|
else :
|
||||||
|
return True
|
||||||
|
|
||||||
#'modprobe cpr_4011_4mxx',
|
#'modprobe cpr_4011_4mxx',
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user