mdadm/tests/md_raid_module/main.sh

40 lines
961 B
Bash
Raw Normal View History

#!/bin/bash
###this case just test raid modeule exit
source include.sh || exit 200
uname -a
for i in 0 1 456 10 ;do
tok "modprobe raid$i "
tok "lsmod |grep raid$i "
if [ $? = 0 ];then
echo "have insert raid0 to OS"
tok "modprobe -r raid$i"
sleep 5
tok "modprobe raid$i "
sleep 5
tok "modprobe -r raid$i"
sleep 5
tok "modprobe raid$i"
sleep 5
else
echo "have no inset this module"
tok "modprobe raid$i"
sleep 5
tok "modprobe -r raid$i"
sleep 5
tok "modprobe raid$i"
sleep 5
tok "modprobe -r raid$i"
fi
done
tend