blob: 18bec2000b76bf78e179b77c15a9a220c8960701 (
plain)
1
2
3
4
5
6
7
8
9
|
[ "$DEVNAME" -a "$(echo $DEVPATH | grep /platform)" ] && /bin/sh -c '# add links for platform devices
test -d $(dirname /dev/$DEVNAME)/by-path || mkdir -p $(dirname /dev/$DEVNAME)/by-path
if [ $(echo $DEVNAME | grep dri) ]; then # for dri create -card and -render links
ln -sf /dev/$DEVNAME /dev/$(dirname $DEVNAME)/by-path/platform-$(echo $DEVPATH | sed -e "s/\//\n/g" | grep "[0-9]:[0-9]" | sed -n "2p")-$(echo $DEVNAME | awk -F / "{print $2}" | sed -e "s/[A-Z]//g" -e "s/[0-9]//g")
else # generic
ln -sf /dev/$DEVNAME /dev/$(dirname $DEVNAME)/by-path/platform-$(echo $DEVPATH | sed -e "s/\//\n/g" | grep "[0-9]:[0-9]" | sed -n "2p")
fi
'
#fi
|