主题 : mdev动态加载的问题,请各位大侠帮帮忙 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 9799
精华: 0
发帖: 1
金钱: 10 两
威望: 5 点
综合积分: 2 分
注册时间: 2009-10-14
最后登录: 2017-09-13
楼主  发表于: 2009-10-14 11:21

 mdev动态加载的问题,请各位大侠帮帮忙

mdev.conf文件如下
#/etc/mdev.conf
sd[a-z][0-9] 0:0 600 @(echo '--OPEN--')
sd[a-z][0-9] 0:0 600 $(echo '--CLOSE--')

如启动时U盘已插入,(/etc/init.d/rcS)运行到medv -s这条指令时,输出--OPEN--,这说明conf脚本配置正确.

但是为什么在启动之后插入U盘,无法实现热插拨提示,只有再从命令行输入medv -s,才能再运行conf显示--OPEN--,
这样不是还是手工载入,请各位大侠帮帮忙.
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2009-10-14 12:01
这也许要看看mdev的源代码才能知道了。
不过可以确定的是,mdev只是负责创建设备节点以及调用相应的命令或脚本。至于U盘的挂载,由U盘设备节点创建后调用的命令或脚本完成,比如root qtopia文件系统里的/bin/hotplug
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
2楼  发表于: 2009-10-14 12:58
/proc/sys/kernel/hotplug 设成/sbin/mdev了?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."