1
0
mirror of https://github.com/byReqz/stocheck.git synced 2024-11-22 14:41:15 +00:00

Compare commits

..

3 Commits

Author SHA1 Message Date
actions
e2aa1d3662 updated hash after commit 2021-10-04 14:22:07 +00:00
nils
29b85bf8ed adapt to changes in lsblk 2021-10-04 16:21:27 +02:00
nils
c91efb37cc add : 2021-09-07 10:29:50 +02:00
2 changed files with 5 additions and 5 deletions

2
hash
View File

@ -1 +1 @@
5a6dbf02666862f837df7f8bf250db08 334383db1cd17348f65459ec82a28ca5

View File

@ -36,24 +36,24 @@ while [ -z "$1" ]; do
fi fi
if [[ "$raidts" == "unmounted" ]];then if [[ "$raidts" == "unmounted" ]];then
raidfs=$(echo "$lsbl" | grep "$raid" | tr -s ' ' | cut -d " " -f 3) raidfs=$(echo "$lsbl" | grep "$raid" | tr -s ' ' | cut -d " " -f 3)
raiduuid=$(echo "$lsbl" | grep "$raid" | tr -s ' ' | cut -d " " -f 4) raiduuid=$(echo "$lsbl" | grep "$raid" | tr -s ' ' | cut -d " " -f 5)
raidstate=$(echo "$mdadmconf" | grep -e "$raid" | cut -d " " -f 4) raidstate=$(echo "$mdadmconf" | grep -e "$raid" | cut -d " " -f 4)
raiddrives=$(echo "$mdadmconf" | grep -e "$raid" | cut -c 6- | grep -o -E "sd[a-z][0-9]|nvme[0-9]n[0-9]p[0-9]" | tr "\n" " ") raiddrives=$(echo "$mdadmconf" | grep -e "$raid" | cut -c 6- | grep -o -E "sd[a-z][0-9]|nvme[0-9]n[0-9]p[0-9]" | tr "\n" " ")
echo -e "\033[1mArray:\033[0m "$raid" \033[1mType:\033[0m "$raidstate" \033[1mFS:\033[0m "$raidfs"" echo -e "\033[1mArray:\033[0m "$raid" \033[1mType:\033[0m "$raidstate" \033[1mFS:\033[0m "$raidfs""
echo -e "\033[1mMembers:\033[0m "$raiddrives"" echo -e "\033[1mMembers:\033[0m "$raiddrives""
echo -e "\033[1mState:\033[0m "$raidts" \033[1mP-UUID\033[0m "$raiduuid"" echo -e "\033[1mState:\033[0m "$raidts" \033[1mP-UUID:\033[0m "$raiduuid""
echo -e "" echo -e ""
else else
raidfs=$(echo "$lsbl" | grep "$raid" | tr -s ' ' | cut -d " " -f 3) raidfs=$(echo "$lsbl" | grep "$raid" | tr -s ' ' | cut -d " " -f 3)
raidper=$(echo "$lsbl" | grep "$raid" | tr -s ' ' | cut -d " " -f 6) raidper=$(echo "$lsbl" | grep "$raid" | tr -s ' ' | cut -d " " -f 6)
raidmp=$(echo "$lsbl" | grep "$raid" | tr -s ' ' | cut -d " " -f 7) raidmp=$(echo "$lsbl" | grep "$raid" | tr -s ' ' | cut -d " " -f 7)
raiduuid=$(echo "$lsbl" | grep "$raid" | tr -s ' ' | cut -d " " -f 4) raiduuid=$(echo "$lsbl" | grep "$raid" | tr -s ' ' | cut -d " " -f 5)
raidstate=$(echo "$mdadmconf" | grep -e "$raid" | cut -d " " -f 4) raidstate=$(echo "$mdadmconf" | grep -e "$raid" | cut -d " " -f 4)
raiddrives=$(echo "$mdadmconf" | grep -e "$raid" | cut -c 6- | grep -o -E "sd[a-z][0-9]|nvme[0-9]n[0-9]p[0-9]" | tr "\n" " ") raiddrives=$(echo "$mdadmconf" | grep -e "$raid" | cut -c 6- | grep -o -E "sd[a-z][0-9]|nvme[0-9]n[0-9]p[0-9]" | tr "\n" " ")
echo -e "\033[1mArray:\033[0m "$raid" \033[1mType:\033[0m "$raidstate" \033[1mSize:\033[0m "$raidts" \033[1m%:\033[0m "$raidper"" echo -e "\033[1mArray:\033[0m "$raid" \033[1mType:\033[0m "$raidstate" \033[1mSize:\033[0m "$raidts" \033[1m%:\033[0m "$raidper""
echo -e "\033[1mMembers:\033[0m "$raiddrives"" echo -e "\033[1mMembers:\033[0m "$raiddrives""
echo -e "\033[1mState:\033[0m "mounted" \033[1mFilesystem:\033[0m "$raidfs" \033[1mMountpoint:\033[0m "$raidmp"" echo -e "\033[1mState:\033[0m "mounted" \033[1mFilesystem:\033[0m "$raidfs" \033[1mMountpoint:\033[0m "$raidmp""
echo -e "\033[1mP-UUID\033[0m "$raiduuid"" echo -e "\033[1mP-UUID:\033[0m "$raiduuid""
echo -e "" echo -e ""
fi fi
done done