From cabd89e05c9a459352765f632e9b6584eaac44c3 Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Mon, 16 Oct 2023 23:04:52 +1100 Subject: [PATCH] Update m2_card_check.sh --- m2_card_check.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/m2_card_check.sh b/m2_card_check.sh index 9048fd3..6f5e701 100644 --- a/m2_card_check.sh +++ b/m2_card_check.sh @@ -1,5 +1,11 @@ #!/bin/bash +# Check script is running as root +if [[ $( whoami ) != "root" ]]; then + echo "This script must be run as sudo or root!" + exit 1 +fi + echo -e '\n Checking permissions and owner on model.dtb files' ls -l /etc.defaults/model.dtb ls -l /etc/model.dtb @@ -150,5 +156,9 @@ ls /run/synostorage/disks | grep nv echo -e '\n Checking nvme block devices in /sys/block' ls /sys/block | grep nv +echo -e '\n Checking synostgd-disk log' +grep synostgd-disk /var/log/messages | tail -10 + echo +