From 4a8bff41382afd07f4880059fcf5d7dd2265d1ab Mon Sep 17 00:00:00 2001 From: Cameron Thompson <50184035+iamromulan@users.noreply.github.com> Date: Thu, 11 Jul 2024 20:38:33 -0400 Subject: [PATCH] mountpoint does not exist --- RM55x_rcPCIe_toolkit.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/RM55x_rcPCIe_toolkit.sh b/RM55x_rcPCIe_toolkit.sh index 7415e9e..eff78d9 100644 --- a/RM55x_rcPCIe_toolkit.sh +++ b/RM55x_rcPCIe_toolkit.sh @@ -101,27 +101,24 @@ send_at_commands() { } basic_55x_setup() { - # Check the mount environment - df -h - # Check if /etc is mounted - if mountpoint -q /etc; then + if grep -qs '/etc ' /proc/mounts; then echo "Unmounting /etc..." umount -lf /etc fi # Check if /real_rootfs is mounted - if mountpoint -q /real_rootfs; then + if grep -qs '/real_rootfs ' /proc/mounts; then # Echo message in red echo -e "\033[31mThe environment has already been setup. If you want to undo the changes temporarily run service mount-fix stop.\033[0m" exit 1 fi - # Check if neither /etc nor /real_rootfs exists - if ! mountpoint -q /etc && ! mountpoint -q /real_rootfs; then + # Check if neither /etc nor /real_rootfs is mounted + if ! grep -qs '/etc ' /proc/mounts && ! grep -qs '/real_rootfs ' /proc/mounts; then # Echo message in red echo -e "\033[31mSomething is wrong or this is not an SDXPINN modem.\033[0m" - echo -e "\033[31mI was expecting either /etc or /real_rootfs to be a mount point.\033[0m" + echo -e "\033[31mI was expecting either /etc or /real_rootfs to be a mount point.\033[0m" exit 1 fi