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()
wr_echoret $? "OK" "ERROR"
checkdrv;
removemod;
}
......@@ -126,6 +127,20 @@ checkdrv()
return 1
fi
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 "sudo depmod -a"
......@@ -173,8 +188,17 @@ weeprom()
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
}
### Load module
loadmodule()
{
......@@ -212,6 +236,7 @@ genreport()
pwd
gengitreport
make -C ${scriptdir}/.. clean
make -C ${scriptdir}/.. update
make -C ${scriptdir}/..
......@@ -222,6 +247,13 @@ genreport()
else
echo "WARNING: Installation skipped"
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()
......
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