Skip to content

Instantly share code, notes, and snippets.

@Avinash-Raj
Last active September 12, 2016 05:20
Show Gist options
  • Save Avinash-Raj/10481176 to your computer and use it in GitHub Desktop.
Save Avinash-Raj/10481176 to your computer and use it in GitHub Desktop.
Shell script to fix "Install NDIS driver failed" error while trying to install Huawei modem drivers on linux
#!/bin/bash
# Run the below script only after "Install NDIS driver failed" error while trying to install Huawei modem drivers on linux.
# I checked this script on Ubuntu.
# Detailed explanation of this script was given here(http://askubuntu.com/a/414401/202806).
path="/usr/local/Mobile_Partner/driver"
if [ "$(ls -A $path)" ]; then
tput setaf 6; echo "Huawei modem drivers for linux are already installed on your pc.Please wait for NDIS driver installation."; tput sgr0
perl -i -pe 's#^(\s*dbg \("can.t kmalloc dev"\);)#//$1#' /usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c
cd $path
sudo ./install
else
tput setaf 1; echo "Huawei modem drivers for linux are not installed on your pc.Please install that."; tput sgr0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment