]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
hddshutdown: Update script for new iostat output format - Bug#12702
authorAdolf Belka <adolf.belka@ipfire.org>
Fri, 8 Oct 2021 21:38:23 +0000 (23:38 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Wed, 13 Oct 2021 12:05:13 +0000 (12:05 +0000)
- Modification of iostat line as per input in Bug#12702

Fixes: 12702
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
src/scripts/hddshutdown

index 146cc73474e57cda8622fd0665841e5390aaee19..ce345e374b77e9edc21eca344a79dea4b0e3f1a6 100644 (file)
@@ -36,7 +36,7 @@ foreach (@devices){
     my @array = split(/\//,$_);
     $diskstats = `cat /var/run/hddstats-$array[$#array] 2>/dev/null`;
     chomp $diskstats;
-    $newdiskstats = `iostat -d -t $_ | tail -2 | head -1 | awk '{ print \$5","\$6}'`;
+    $newdiskstats = `iostat -d -t $_ | tail -3 | head -1 | awk '{ print \$6","\$7}'`;
     chomp $newdiskstats;
     $status = `hdparm -C /dev/$_ | tail -1 | cut -d: -f2`;
     chomp $status;