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