mirror of
https://github.com/Retropex/raspiblitz.git
synced 2025-05-13 03:30:49 +02:00
test uuid of backupdevice (#3976)
This commit is contained in:
parent
9039a0f1b2
commit
d9e7b66143
@ -27,7 +27,14 @@ if [ "$1" = "status" ]; then
|
|||||||
# check if backup device is mounted
|
# check if backup device is mounted
|
||||||
backupDeviceExists=$(df | grep -c "/mnt/backup")
|
backupDeviceExists=$(df | grep -c "/mnt/backup")
|
||||||
if [ ${backupDeviceExists} -gt 0 ]; then
|
if [ ${backupDeviceExists} -gt 0 ]; then
|
||||||
echo "isMounted=1"
|
backupDeviceName=$(lsblk -o NAME,UUID | grep "${localBackupDeviceUUID}" | cut -d " " -f 1)
|
||||||
|
backupDeviceName=${backupDeviceName:2:4}
|
||||||
|
backupDeviceIsBackupDevice=$(df | grep -c ${backupDeviceName})
|
||||||
|
if [ ${backupDeviceIsBackupDevice} -gt 0 ]; then
|
||||||
|
echo "isMounted=1"
|
||||||
|
else
|
||||||
|
echo "isMounted=0"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "isMounted=0"
|
echo "isMounted=0"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user