Merge branch 'main' of https://github.com/jerry048/Seedbox-Components
This commit is contained in:
commit
424cf4a14e
|
@ -26,25 +26,17 @@ do
|
||||||
drive+=($device)
|
drive+=($device)
|
||||||
i=$(( $i + 1 ))
|
i=$(( $i + 1 ))
|
||||||
done
|
done
|
||||||
i=1
|
i=1 x=0
|
||||||
x=0
|
while [ $i -le $diskno ]
|
||||||
disktype=$(cat /sys/block/sda/queue/rotational)
|
do
|
||||||
|
diskname=$(eval echo ${drive["$x"]})
|
||||||
|
disktype=$(cat /sys/block/$diskname/queue/rotational)
|
||||||
if [ "${disktype}" == 0 ]; then
|
if [ "${disktype}" == 0 ]; then
|
||||||
while [ $i -le $diskno ]
|
|
||||||
do
|
|
||||||
diskname=$(eval echo ${drive["$x"]})
|
|
||||||
echo kyber > /sys/block/$diskname/queue/scheduler
|
echo kyber > /sys/block/$diskname/queue/scheduler
|
||||||
i=$(( $i + 1 ))
|
|
||||||
x=$(( $x + 1 ))
|
|
||||||
done
|
|
||||||
else
|
else
|
||||||
while [ $i -le $diskno ]
|
|
||||||
do
|
|
||||||
diskname=$(eval echo ${drive["$x"]})
|
|
||||||
echo mq-deadline > /sys/block/$diskname/queue/scheduler
|
echo mq-deadline > /sys/block/$diskname/queue/scheduler
|
||||||
i=$(( $i + 1 ))
|
|
||||||
x=$(( $x + 1 ))
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
i=$(( $i + 1 )) x=$(( $x + 1 ))
|
||||||
|
done
|
||||||
clear
|
clear
|
||||||
exit 0
|
exit 0
|
Loading…
Reference in New Issue