Documentation/dvb/udev

Chinese translated version of Documentation/filesystems/ecryptfs


If you have any comment or update to the content, please contact the
original document maintainer directly.  However, if you have a problem
communicating in English you can also ask the Chinese maintainer for
help.  Contact the Chinese maintainer if this translation is outdated
or if there is a problem with the translation.




Chinese maintainer: 朱司仪  331954465@qq.com
---------------------------------------------------------------------
Documentation/dvb/udev的中文翻译




如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。


中文版维护者: 朱司仪  331954465@qq.com
中文版翻译者: 朱司仪  331954465@qq.com
中文版校译者: 朱司仪  331954465@qq.com




以下为正文
---------------------------------------------------------------------
                      =============
                      Documentation/dvb/udev
                      =============
======
The DVB subsystem currently registers to the sysfs subsystem using the
"class_simple" interface.


目前DVB子系统寄存器sysfs的子系统,采用“class_simple接口。




This means that only the basic information like module loading parameters
are presented through sysfs. Other things that might be interesting are
currently *not* available.


这意味着,只有模块加载参数的基本信息,如
通过sysfs。其他一些有趣的程序目前可能还是不可用的。




Nevertheless it's now possible to add proper udev rules so that the
DVB device nodes are created automatically.


然而,它现在允许添加适当的udev规则使DVB设备节点能够自动建立。




We assume that you have udev already up and running and that have been
creating the DVB device nodes manually up to now due to the missing sysfs
support.


我们假设你设备上的udev已经投入运行,并已
手动创建的DVB设备节点,到现在为止,由于没有的sysfs的支持。




0. Don't forget to disable your current method of creating the
device nodes manually.


当然不要忘了禁用当前的方法创建手动设备节点




1. Unfortunately, you'll need a helper script to transform the kernel
sysfs device name into the well known dvb adapter / device naming scheme.
The script should be called "dvb.sh" and should be placed into a script
dir where udev can execute it, most likely /etc/udev/scripts/


1。不幸的是,你会需要一个辅助脚本来转换内核
sysfs的设备名称为众所周知的DVB适配器/设备命名方案。
这个脚本应该被称为“dvb.sh”,并应放置到一个脚本
dir其中的udev可以执行它,最有可能的/etc/udev/scripts/




So, create a new file /etc/udev/scripts/dvb.sh and add the following:
------------------------------schnipp------------------------------------------------
#!/bin/sh
/bin/echo $1 | /bin/sed -e 's,dvb\([0-9]\)\.\([^0-9]*\)\([0-9]\),dvb/adapter\1/\2\3,'
------------------------------schnipp------------------------------------------------


Don't forget to make the script executable with "chmod".




因此,创建一个新的文件在/ etc/ udev的/脚本/ dvb.sh并添加以下内容:
------------------------------schnipp------------------------------------------------
#!/bin/sh
/bin/echo $1 | /bin/sed -e 's,dvb\([0-9]\)\.\([^0-9]*\)\([0-9]\),dvb/adapter\1/\2\3,'
------------------------------schnipp------------------------------------------------
不要忘了用“文件模式”使脚本可执行。




1. You need to create a proper udev rule that will create the device nodes
like you know them. All real distributions out there scan the /etc/udev/rules.d
directory for rule files. The main udev configuration file /etc/udev/udev.conf
will tell you the directory where the rules are, most likely it's /etc/udev/rules.d/




1。你需要创建一个适当的udev规则,将创建设备节点
你知道他们喜欢。所有真正有分布扫描在/etc/udev/rules.d中
规则文件的目录。主要的udev配置文件/etc/udev/udev.conf中指定
会告诉你所在的目录规则是,最有可能的是,它的/etc/udev/rules.d/中




Create a new rule file in that directory called "dvb.rule" and add the following line:
------------------------------schnipp------------------------------------------------
KERNEL="dvb*", PROGRAM="/etc/udev/scripts/dvb.sh %k", NAME="%c"
------------------------------schnipp------------------------------------------------


If you want more control over the device nodes (for example a special group membership)
have a look at "man udev".




该目录文件中称为“dvb.rule”创建一个新的规则,并添加下面一行:
------------------------------schnipp------------------------------------------------
KERNEL="dvb*", PROGRAM="/etc/udev/scripts/dvb.sh %k", NAME="%c"
------------------------------schnipp------------------------------------------------


如果你想更多的控制设备节点(例如,一个特殊的群体成员)可以参考“man udev”。




For every device that registers to the sysfs subsystem with a "dvb" prefix,
the helper script /etc/udev/scripts/dvb.sh is invoked, which will then
create the proper device node in your /dev/ directory.


对于每个设备寄存器“DVB”前缀的sysfs子系统,
辅助脚本/etc/udev/scripts/dvb.sh的调用,然后将
建立适当的设备节点在/ dev/目录下的。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值