hal-serial-hsotype

来自「udev是一种工具」· 代码 · 共 23 行

TXT
23
字号
#!/bin/bash# # Hal-Daemon script, which fetches additional data from the hso driver via# udev and save it in an additional property into the Hal database.# If you like to use these additional hal properties also in a fdi file,# it is strongly recommended to call this script as a preprobe callout.## activate this script by adding this rule to the hso serial sub device:# <append key="info.callouts.preprobe" type="strlist">hal-serial-hsotype</append>#case "${HALD_ACTION}" in    preprobe|add)	UDEV_PATH=$(udevinfo --name $HAL_PROP_LINUX_DEVICE_FILE --query=path )	HSOTYPE=$( cat /sys${UDEV_PATH}/hsotype )	/usr/bin/hal-set-property --udi ${UDI} --key "info.hsotype" --string "${HSOTYPE}"	exit 0	;;    *)	echo "unsupported HALD_ACTION: ${HALD_ACTION}"	exit 1	;;esac

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?