summarylogtreecommitdiffstats
path: root/20-platform
diff options
context:
space:
mode:
Diffstat (limited to '20-platform')
-rw-r--r--20-platform11
1 files changed, 6 insertions, 5 deletions
diff --git a/20-platform b/20-platform
index 175dde4a3a6a..18bec2000b76 100644
--- a/20-platform
+++ b/20-platform
@@ -1,8 +1,9 @@
-if [[ $DEVNAME && $(echo $DEVPATH | grep /platform) ]]; then # add links for platform devices
+[ "$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')
+ 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/pci-$(echo $DEVPATH | sed -e 's/\//\n/g' | grep '[0-9]:[0-9]' | sed -n '2p')
+ 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
+'
+#fi