Commit afc0d7fe authored by Benoit Rat's avatar Benoit Rat

script: improve installation for ubuntu 14.04

Adding extra to depmod.conf search path in order to force looking at our
installed modules
parent 70996edc
...@@ -110,6 +110,7 @@ insthdl() ...@@ -110,6 +110,7 @@ insthdl()
wr_echoret $? "OK" "ERROR" wr_echoret $? "OK" "ERROR"
checkdrv; checkdrv;
removemod;
} }
...@@ -126,6 +127,20 @@ checkdrv() ...@@ -126,6 +127,20 @@ checkdrv()
return 1 return 1
fi fi
done done
if (lsb_release -a 2>&1 | grep Ubuntu &> /dev/null); then
echo "Forcing depmod.conf to look into";
fi
if (lsb_release -a | grep Ubuntu); then
cat /etc/depmod.d/ubuntu.conf | grep extra &> /dev/null
if [ "x$?" != "x0" ]; then
echo "Adding extra to depmod.conf search path in order to force looking at our installed modules"
sed 's/built-in/extra built-in/g' -i /etc/depmod.d/ubuntu.conf
fi
fi
echo "Creating dependancies... (This can take some time)" echo "Creating dependancies... (This can take some time)"
echo "sudo depmod -a" echo "sudo depmod -a"
...@@ -173,8 +188,17 @@ weeprom() ...@@ -173,8 +188,17 @@ weeprom()
done done
} }
removemod()
{
for mod in "wr-nic" "spec" "fmc"; do
lsmod | grep ${mod} &> /dev/null
if [ "x$?" = "x0" ]; then
echo "Removing ${mod}"
sudo rmmod ${mod}
fi
done done
} }
### Load module ### Load module
loadmodule() loadmodule()
{ {
...@@ -212,6 +236,7 @@ genreport() ...@@ -212,6 +236,7 @@ genreport()
pwd pwd
gengitreport gengitreport
make -C ${scriptdir}/.. clean make -C ${scriptdir}/.. clean
make -C ${scriptdir}/.. update make -C ${scriptdir}/.. update
make -C ${scriptdir}/.. make -C ${scriptdir}/..
...@@ -222,6 +247,13 @@ genreport() ...@@ -222,6 +247,13 @@ genreport()
else else
echo "WARNING: Installation skipped" echo "WARNING: Installation skipped"
fi fi
cat /sys/module/fmc/version
for fmcmod in $(find /lib/modules/$(uname -r) -name fmc.ko); do
echo ${fmcmod}
strings ${fmcmod} | grep version=
done
} }
gengitreport() gengitreport()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment