From e1df9c938c72c8a053d1de711d88fe069bab6b83 Mon Sep 17 00:00:00 2001 From: Antonio De Lucreziis Date: Thu, 7 Jul 2022 16:25:30 +0200 Subject: [PATCH] Updated scripts --- scripts/disk-usage | 2 +- scripts/raid-status | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/disk-usage b/scripts/disk-usage index 1af78a4..f5139c8 100755 --- a/scripts/disk-usage +++ b/scripts/disk-usage @@ -2,4 +2,4 @@ DEVICE="$1" -df | grep "$DEVICE" | tr -s ' ' | cut -d' ' -f 2-3 | tr ' ' '\n' +df "$DEVICE" | tail -n 1 | tr -s ' ' | cut -d' ' -f 2-3 | tr ' ' '\n' diff --git a/scripts/raid-status b/scripts/raid-status index bd0f4c4..ffa7ca9 100755 --- a/scripts/raid-status +++ b/scripts/raid-status @@ -1,6 +1,6 @@ #!/bin/sh -DEVICE="/dev/md0" +DEVICE="$1" TOTAL_DEVICES=$(mdadm -D "$DEVICE" | grep 'Total Devices' | cut -d':' -f 2 | tr -d ' ')