From 5e79a39ca5a162b26da81ff25ed680dbbae377fd Mon Sep 17 00:00:00 2001 From: jerry048 Date: Mon, 27 Feb 2023 02:52:31 +0800 Subject: [PATCH] Update tweaking.sh --- tweaking.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tweaking.sh b/tweaking.sh index 1379d24..90c088d 100644 --- a/tweaking.sh +++ b/tweaking.sh @@ -67,7 +67,8 @@ function Scheduler_Tweaking { done i=1 x=0 - disktype=$(cat /sys/block/sda/queue/rotational) + disk_name=$(printf $(lsblk | grep -m1 'disk' | awk '{print $1}')) + disktype=$(cat /sys/block/$disk_name/queue/rotational) if [ "${disktype}" == 0 ]; then while [ $i -le $diskno ] do