如何在我主动按重启键时,自动运行脚本或命令
Tofloor
poster avatar
nfeng
deepin
2019-10-07 06:33
Author


由于无线网卡8723bu驱动问题,每次重启前手动运行sudo modprobe -r rtl8xxxu ,重启后就可以实现自动连上WIFI了

但每次手动实在麻烦,这两天用脚本在/etc/init.d/K99xxxx.sh上不断修改N次,用.bash_logout也反复尝试,依然无法

实现主动按重启键时,自动运行sudo modprobe -r rtl8xxxu ,请问还有什么办法?

Reply Favorite View the author
All Replies
avatar
funtoo
deepin
2019-10-07 06:43
#1
直接把这个模块加入黑名单就可以了啊,哪需要这么麻烦。
在/etc/modprobe.d下面随意新建个配置文件,比如blacklist-rtl.conf写入以下内容
  1. blacklist rtl8xxxu
Copy the Code
模块名称根据实际情况修改。
Reply View the author
avatar
nfeng
deepin
2019-10-07 16:56
#2
funtoo 发表于 2019-10-6 22:43
直接把这个模块加入黑名单就可以了啊,哪需要这么麻烦。
在/etc/modprobe.d下面随意新建个配置文件,比如bl ...

这个方法我试过了,重启后同样不能连wifi,可能是我的平板太老,必须是御载后重启
Reply View the author
avatar
edeas
deepin
2019-10-08 17:52
#3
把重启命令加到你的脚本后不就行了吗?
Reply View the author