Minor Fixes
This commit is contained in:
+14
-7
@@ -80,6 +80,12 @@ cleanup () {
|
||||
umount "/mnt/reinstallbackups"
|
||||
umount "/mnt/decs"
|
||||
fi
|
||||
if [[ ! $ticket_number =~ ^\s*$ ]];
|
||||
then
|
||||
umount /mnt/"$ticket_number"
|
||||
else
|
||||
umount "/mnt/UNKNWN"
|
||||
fi
|
||||
}
|
||||
|
||||
trap catch_sigint SIGINT
|
||||
@@ -226,15 +232,15 @@ get_devicetype () {
|
||||
|
||||
get_device () {
|
||||
device=
|
||||
loginfo "Listing current attached devices..."
|
||||
loginfo "Listing current attached devices..."
|
||||
loginfo ""
|
||||
if [[ $devicetype = "HDD_SATA" ]] || [[ $devicetype = "SSD_SATA" ]];
|
||||
then
|
||||
loginfo "$(lsblk -o NAME,SIZE,MODEL,VENDOR,ROTA | grep -E '^NAME|sda')"
|
||||
loginfo "$(lsblk -o NAME,SIZE,MODEL,VENDOR,ROTA | grep -E '^NAME|sd[a-z]')"
|
||||
elif [[ $devicetype = "SSD_NVME" ]];
|
||||
then
|
||||
pcie_enable
|
||||
loginfo "$(lsblk -o NAME,SIZE,MODEL,VENDOR,ROTA | grep -E '^NAME|nvme')"
|
||||
loginfo "$(lsblk -o NAME,SIZE,MODEL,VENDOR,ROTA | grep -E '^NAME|nvme[0-9]')"
|
||||
fi
|
||||
loginfo ""
|
||||
loginput "Which is the device from this list? (Type 'help' for help.)"
|
||||
@@ -378,9 +384,10 @@ make_infolog () {
|
||||
loginfo "Windows install detected on $device$i."
|
||||
echo "Windows install detected on $device$i." >> "$infolog"
|
||||
echo "" >> "$infolog"
|
||||
winpath=$(find /mnt/"$ticket_number" -maxdepth 4 -ipath "*System32/config" -not -ipath "*Windows.old*")
|
||||
cp "$winpath/SOFTWARE" /tmp/"$ticket_number"/SOFTWARE
|
||||
cp "$winpath/SYSTEM" /tmp/"$ticket_number"/SYSTEM
|
||||
winsoftwarepath=$(find /mnt/"$ticket_number" -maxdepth 4 -ipath "*System32/config/SOFTWARE" -not -ipath "*Windows.old*")
|
||||
winsystempath=$(find /mnt/"$ticket_number" -maxdepth 4 -ipath "*System32/config/SYSTEM" -not -ipath "*Windows.old*")
|
||||
cp "$winsoftwarepath" /tmp/"$ticket_number"/SOFTWARE
|
||||
cp "$winsystempath" /tmp/"$ticket_number"/SYSTEM
|
||||
CurrentVersion=$(hivexregedit --export --unsafe-printable-strings --max-depth 1 --prefix \\HKEY_LOCAL_MACHINE\\SOFTWARE /tmp/"$ticket_number"/SOFTWARE '\Microsoft\Windows NT\CurrentVersion')
|
||||
ComputerName=$(hivexregedit --export --unsafe-printable-strings --max-depth 1 --prefix \\HKEY_LOCAL_MACHINE\\SYSTEM /tmp/"$ticket_number"/SYSTEM '\ControlSet001\Control\ComputerName\ComputerName')
|
||||
Parameters=$(hivexregedit --export --unsafe-printable-strings --max-depth 1 --prefix \\HKEY_LOCAL_MACHINE\\SYSTEM /tmp/"$ticket_number"/SYSTEM '\ControlSet001\Services\Tcpip\Parameters')
|
||||
@@ -401,7 +408,7 @@ make_infolog () {
|
||||
echo "$LogonUI" | grep -E '"LastLoggedOnDisplayName"=str\(1\):".+"' | sed -E 's/"LastLoggedOnDisplayName"=str\(1\):"(.+)"/Last Logged On User: \1/'
|
||||
echo "$ProfileList" | grep -E '"ProfileImagePath"=str\(2\):".+"' | sed -E 's/"ProfileImagePath"=str\(2\):"(.+)"/User: \1/'
|
||||
echo ""
|
||||
tree -a -L 1 -D "$(find /mnt/"$ticket_number"/ -maxdepth 2 -type d -ipath "*/Users" -not -ipath "*Windows.old*")"
|
||||
tree -a -L 1 -D "$(find /mnt/"$ticket_number"/ -maxdepth 2 -type d -ipath "*/Users" -o -ipath "*/Documents and Settings" -not -ipath "*Windows.old*" | head -1)"
|
||||
echo ""
|
||||
} >> "$infolog"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user