Fix partition reading
This commit is contained in:
1 parent
455e961b9c
commit
9f2e09e0eb
2 files changed
+10
-10
No files matched your search
+5
-5
@@ -325,14 +325,14 @@ make_infolog () {
|
||||
local fstype=
|
||||
for i in $(seq 1 "$(lsblk -n -l -o TYPE /dev/"$device" | grep -c "part")");
|
||||
do
|
||||
fstype=$(lsblk -n -o FSTYPE /dev/"$device""$i")
|
||||
fstype=$(lsblk -n -o FSTYPE /dev/"$device"p"$i")
|
||||
loginfo "Reading $device$i : $fstype."
|
||||
echo "" >> "$infolog"
|
||||
echo "$device$i : $fstype" >> "$infolog"
|
||||
case $fstype in
|
||||
"ext4"|"ext3"|"ext2"|"xfs"|"btrfs")
|
||||
mkdir -p /mnt/"$ticket_number"
|
||||
if mount -t "$fstype" /dev/"$device""$i" /mnt/"$ticket_number"
|
||||
if mount -t "$fstype" /dev/"$device"p"$i" /mnt/"$ticket_number"
|
||||
then
|
||||
if find /mnt/"$ticket_number" -maxdepth 3 -ipath "*/etc/os-release" | grep "."
|
||||
then
|
||||
@@ -368,7 +368,7 @@ make_infolog () {
|
||||
"ntfs")
|
||||
mkdir -p /tmp/"$ticket_number"
|
||||
mkdir -p /mnt/"$ticket_number"
|
||||
if mount -t "$fstype" /dev/"$device""$i" /mnt/"$ticket_number"
|
||||
if mount -t "$fstype" /dev/"$device"p"$i" /mnt/"$ticket_number"
|
||||
then
|
||||
if find /mnt/"$ticket_number" -maxdepth 3 -ipath "*System32/config" -not -ipath "*Windows.old*" | grep "."
|
||||
then
|
||||
@@ -429,7 +429,7 @@ make_infolog () {
|
||||
mkdir -p /mnt/"$ticket_number"
|
||||
loginfo "Apple install detected on $device$i."
|
||||
echo "Apple install detected on $device$i." >> "$infolog"
|
||||
if mount -t "$fstype" /dev/"$device""$i" /mnt/"$ticket_number"
|
||||
if mount -t "$fstype" /dev/"$device"p"$i" /mnt/"$ticket_number"
|
||||
then
|
||||
echo "¯\_(ツ)_/¯" >> "$infolog"
|
||||
tree -a -L 1 -D /mnt/"$ticket_number"/Users >> "$infolog"
|
||||
@@ -444,7 +444,7 @@ make_infolog () {
|
||||
loginfo "Boot/Recovery partition detected."
|
||||
echo "Boot/Recovery partition detected." >> "$infolog"
|
||||
mkdir -p /mnt/"$ticket_number"
|
||||
if mount -t "$fstype" /dev/"$device""$i" /mnt/"$ticket_number"
|
||||
if mount -t "$fstype" /dev/"$device"p"$i" /mnt/"$ticket_number"
|
||||
then
|
||||
tree -a -R -D /mnt/"$ticket_number" >> "$infolog"
|
||||
umount /mnt/"$ticket_number"
|
||||
|
||||
+5
-5
@@ -258,14 +258,14 @@ make_infolog () {
|
||||
local fstype=
|
||||
for i in $(seq 1 "$(lsblk -n -l -o TYPE /dev/"$device" | grep -c "part")");
|
||||
do
|
||||
fstype=$(lsblk -n -o FSTYPE /dev/"$device""$i")
|
||||
fstype=$(lsblk -n -o FSTYPE /dev/"$device"p"$i")
|
||||
loginfo "Reading $device$i : $fstype."
|
||||
echo "" >> "$infolog"
|
||||
echo "$device$i : $fstype" >> "$infolog"
|
||||
case $fstype in
|
||||
"ext4"|"ext3"|"ext2"|"xfs"|"btrfs")
|
||||
mkdir -p /mnt/UNKNWN
|
||||
if mount -t "$fstype" /dev/"$device""$i" /mnt/UNKNWN
|
||||
if mount -t "$fstype" /dev/"$device"p"$i" /mnt/UNKNWN
|
||||
then
|
||||
if find /mnt/UNKNWN -maxdepth 3 -ipath "*/etc/os-release" | grep "."
|
||||
then
|
||||
@@ -301,7 +301,7 @@ make_infolog () {
|
||||
"ntfs")
|
||||
mkdir -p /tmp/UNKNWN
|
||||
mkdir -p /mnt/UNKNWN
|
||||
if mount -t "$fstype" /dev/"$device""$i" /mnt/UNKNWN
|
||||
if mount -t "$fstype" /dev/"$device"p"$i" /mnt/UNKNWN
|
||||
then
|
||||
if find /mnt/UNKNWN -maxdepth 3 -ipath "*System32/config" -not -ipath "*Windows.old*" | grep "."
|
||||
then
|
||||
@@ -361,7 +361,7 @@ make_infolog () {
|
||||
mkdir -p /mnt/UNKNWN
|
||||
loginfo "Apple install detected on $device$i."
|
||||
echo "Apple install detected on $device$i." >> "$infolog"
|
||||
if mount -t "$fstype" /dev/"$device""$i" /mnt/UNKNWN
|
||||
if mount -t "$fstype" /dev/"$device"p"$i" /mnt/UNKNWN
|
||||
then
|
||||
echo "¯\_(ツ)_/¯" >> "$infolog"
|
||||
tree -a -L 1 -D /mnt/UNKNWN/Users >> "$infolog"
|
||||
@@ -376,7 +376,7 @@ make_infolog () {
|
||||
loginfo "Boot/Recovery partition detected."
|
||||
echo "Boot/Recovery partition detected." >> "$infolog"
|
||||
mkdir -p /mnt/UNKNWN
|
||||
if mount -t "$fstype" /dev/"$device""$i" /mnt/UNKNWN
|
||||
if mount -t "$fstype" /dev/"$device"p"$i" /mnt/UNKNWN
|
||||
then
|
||||
tree -a -R -D /mnt/UNKNWN >> "$infolog"
|
||||
umount /mnt/UNKNWN
|
||||
|
||||
Reference in new issue
Block a user