GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — mxser/mxinstall at master · uecasm/mxser Expand file tree/ Copy pathmxinstallMore file actions executable file ·117 lines (109 loc) · 3.04 KB / Copy pathmxinstallFile metadata and controlsexecutable file ·117 lines (109 loc) · 3.04 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 #!/bin/sh ############################################################################### # Program: # MOXA Linux driver installer # # History: # 2009/05/21 # # Author: # Eric Lo, [email protected] # # Discription: # The script install and load the MOXA Linux driver. # ############################################################################### TARGET_DRIVER1=mxser TARGET_DRIVER2=mxupcie BAN_DRIVER1=8250_moxa BAN_DRIVER2=8250_pci MXVER=`awk '{if($2=="MX_SER_VERSION"){print $3}}' mx_ver.h | sed s/\"//g` MAJOR_PCI=30 MAJOR_PCIE=31 MINOR=32 INPUT=$1 MOXA_VENDOR=1393 MOXA_DEVICE="1024 1025 1027 1045 1046 1121 1144 1145 1160 1161 1182 1183 1322 1323 1342 1343 1381 1683" # # Information # echo "*********************************************************************" echo " MOXA Smartio/Industio Family Multiport Board Device Driver " echo " Quick install Script" echo "*********************************************************************" # # Detect Build-in Kernel Module/Driver # echo "$MOXA_DEVICE" | tr ' ' '\n' | while read i; do VEN_DEV="${MOXA_VENDOR}:$i" BUS_INFO=`lspci -D -n | grep $VEN_DEV | cut -c 1-12` if [ -n "$BUS_INFO" ] then echo "$BUS_INFO" | while read j; do REPROBE_MOXA_DRIVER=0 if [ -d "/sys/bus/pci/drivers/8250_moxa/$j" ] then REPROBE_MOXA_DRIVER=1 elif [ -d "/sys/bus/pci/drivers/serial/$j" ] then REPROBE_MOXA_DRIVER=1 fi if [ "$REPROBE_MOXA_DRIVER" -eq "1" ] then ./driver/moxa_unbind if [ -d "/etc/moxa" ];then cp ./driver/moxa_unbind /etc/moxa/ cp ./driver/moxa_unbind.service /etc/systemd/system/ systemctl enable moxa_unbind.service systemctl start moxa_unbind.service else mkdir /etc/moxa cp ./driver/moxa_unbind /etc/moxa/ cp ./driver/moxa_unbind.service /etc/systemd/system/ systemctl enable moxa_unbind.service systemctl start moxa_unbind.service fi break fi done UNBIND_SERVICE=`systemctl list-unit-files | grep enabled | grep moxa_unbind.service` if [ -n "$UNBIND_SERVICE" ] then break; fi fi done if lsmod | grep -q $TARGET_DRIVER1 ; then echo "Found $TARGET_DRIVER1 in system..." echo "Unloading $TARGET_DRIVER1..." rmmod $TARGET_DRIVER1 echo "Unload $TARGET_DRIVER1 successfully." echo "" fi if lsmod | grep -q $TARGET_DRIVER2 ; then echo "Found $TARGET_DRIVER2 in system..." echo "Unloading $TARGET_DRIVER2..." rmmod $TARGET_DRIVER2 echo "Unload $TARGET_DRIVER2 successfully." echo "" fi if [ "$INPUT" = "" ] ; then INPUT="install" fi if make $INPUT ; then echo "" echo "Loading driver..." modprobe $TARGET_DRIVER1 modprobe $TARGET_DRIVER2 [ -f /dev/mxser ] || rm -rf /dev/mxser mknod /dev/mxser c $MAJOR_PCI $MINOR chmod a+wx /dev/mxser [ -f /dev/mxupcie ] || rm -rf /dev/mxupcie mknod /dev/mxupcie c $MAJOR_PCIE $MINOR chmod a+wx /dev/mxupcie echo "**********************************************************************" echo -n " MOXA Smartio/Industio Family driver " echo -n $MXVER echo " loaded successfully." echo "**********************************************************************" fi |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |