filesystem recognition
parent
7f19b8d76c
commit
5817c6d64d
13
livekitlib
13
livekitlib
|
|
@ -213,14 +213,15 @@ mounted_device()
|
||||||
device_bestfs()
|
device_bestfs()
|
||||||
{
|
{
|
||||||
debug_log "device_bestfs"
|
debug_log "device_bestfs"
|
||||||
local PEEK
|
local FS
|
||||||
|
|
||||||
PEEK="$(dd if="$1" bs=1k count=1 2>/dev/null | strings)"
|
FS="$(blkid "$1" | sed -r "s/.*TYPE=//" | tr -d '"' | tr [A-Z] [a-z])"
|
||||||
if [ "$(echo "$PEEK" | egrep -i "FAT[13][26]")" != "" ]; then
|
if [ "$FS" = "msdos" -o "$FS" = "fat" -o "$FS" = "vfat" ]; then
|
||||||
echo "-t vfat"
|
FS="vfat"
|
||||||
elif [ "$(echo "$PEEK" | egrep -i 'NTFS')" != "" ]; then
|
elif [ "$FS" = "ntfs" ]; then
|
||||||
echo "-t ntfs-3g"
|
FS="ntfs-3g"
|
||||||
fi
|
fi
|
||||||
|
echo "-t $FS"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Find LIVEKIT data by mounting all devices
|
# Find LIVEKIT data by mounting all devices
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue