add info in install devcie

This commit is contained in:
rootzoll 2025-01-19 10:50:20 +01:00
parent 699ee072d4
commit 3c57e8ff47

View File

@ -507,7 +507,7 @@ if [ "$action" = "status" ] || [ "$action" = "mount" ] || [ "$action" = "unmount
fi
done
# check if any partition of device is mounted as root
# check if any partition of install device is mounted as root
installDeviceActive=0
if [ ${#installDevice} -gt 0 ]; then
rootPartition=$(lsblk -no NAME,MOUNTPOINT "/dev/${installDevice}"| awk '$2 == "/"' | sed 's/[└├]─//g' | cut -d' ' -f1)
@ -516,6 +516,14 @@ if [ "$action" = "status" ] || [ "$action" = "mount" ] || [ "$action" = "unmount
fi
fi
# check if install device is read-only
installDeviceReadOnly=0
if [ ${#installDevice} -gt 0 ]; then
if [ -f "/sys/block/${installDevice}/ro" ] && [ "$(cat /sys/block/${installDevice}/ro)" = "1" ]; then
installDeviceReadOnly=1
fi
fi
#################
# Define Scenario
@ -589,6 +597,7 @@ if [ "$action" = "status" ] || [ "$action" = "mount" ] || [ "$action" = "unmount
echo "dataInspectSuccess='${dataInspectSuccess}'"
echo "installDevice='${installDevice}'"
echo "installDeviceActive='${installDeviceActive}'"
echo "installDeviceReadOnly='${installDeviceReadOnly}'"
echo "combinedDataStorage='${combinedDataStorage}'"
echo "bootFromStorage='${bootFromStorage}'"
echo "bootFromSD='${bootFromSD}'"