Commit c3b5ef9c authored by Benoit Rat's avatar Benoit Rat

scripts: force to dash interpreter

Also correct bad error message when removing kernel modules
parent 6ee2da49
#!/bin/sh #!/bin/dash
## Script to ease the installation of gateware HDL when using ## Script to ease the installation of gateware HDL when using
## the starting kit ## the starting kit
## ##
...@@ -118,6 +118,7 @@ checkdrv() ...@@ -118,6 +118,7 @@ checkdrv()
{ {
echo "" echo ""
echo "Checking the drivers" echo "Checking the drivers"
for mod in "fmc" "spec" "wr-nic"; do for mod in "fmc" "spec" "wr-nic"; do
if [ -s /lib/modules/$(uname -r)/extra/${mod}.ko ]; then if [ -s /lib/modules/$(uname -r)/extra/${mod}.ko ]; then
echo "${mod}.ko found!" echo "${mod}.ko found!"
...@@ -186,9 +187,8 @@ weeprom() ...@@ -186,9 +187,8 @@ weeprom()
removemod() removemod()
{ {
for mod in "wr-nic" "spec" "fmc"; do for mod in "wr-nic" "spec" "fmc"; do
lsmod | grep ${mod} &> /dev/null if ( lsmod | grep ${mod} > /dev/null ); then
if [ "x$?" = "x0" ]; then echo "Removing ${mod} kernel module..."
echo "Removing ${mod}"
sudo rmmod ${mod} sudo rmmod ${mod}
fi fi
done done
......
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