mirror of
https://github.com/PartialVolume/shredos.x86_64.git
synced 2026-02-20 09:35:26 +00:00
ShredOS now waits for USB devices to initialise before launching nwipe. Nwipes's PDF report is now written to the ShredOS USB flash drive.
This commit is contained in:
@@ -43,9 +43,10 @@ if [ $status != 0 ] && [ $status != 32 ]; then
|
||||
else
|
||||
printf "archive_log.sh: FAT32 partition $drive is now mounted to $archive_drive_directory\n"
|
||||
|
||||
# Copy the dmesg.txt file over to the FAT32 partition
|
||||
# Copy the dmesg.txt and PDF files over to the FAT32 partition
|
||||
dmesg > dmesg.txt
|
||||
cp /dmesg.txt "$archive_drive_directory/"
|
||||
cp /nwipe_report_*pdf "$archive_drive_directory/"
|
||||
if [ $? != 0 ]; then
|
||||
printf "archive_log.sh: Unable to copy the dmesg.txt file to the root of $drive:/\n"
|
||||
else
|
||||
@@ -71,6 +72,7 @@ else
|
||||
if [ exit_code != 5 ]; then
|
||||
# Move the nwipe logs into the RAM disc sent directory
|
||||
mv /nwipe_log* "$sent_directory/"
|
||||
mv /nwipe_report*pdf "$sent_directory/"
|
||||
if [ $? != 0 ]; then
|
||||
printf "archive_log.sh: Unable to move the nwipe logs into the $sent_directory on the RAM disc\n"
|
||||
exit_code=6
|
||||
|
||||
@@ -4,6 +4,36 @@
|
||||
#
|
||||
trap "echo" INT
|
||||
|
||||
# Check dmesg for USB activity, do not proceed until there has been no
|
||||
# activity for 5 seconds or automatically proceed after 15 seconds.
|
||||
#
|
||||
previous_sha1=""
|
||||
loop_count=0
|
||||
|
||||
printf "\nWaiting for all USB devices to be initialised, timeout 30s ."
|
||||
|
||||
while [ 1 ]; do
|
||||
sha1=$(dmesg | grep -i USB | sha1sum)
|
||||
if [[ "$previous_sha1" == "$sha1" ]]; then
|
||||
break
|
||||
fi
|
||||
previous_sha1=$sha1
|
||||
sleep 1
|
||||
printf "."
|
||||
sleep 1
|
||||
printf "."
|
||||
sleep 1
|
||||
printf "."
|
||||
sleep 1
|
||||
printf "."
|
||||
sleep 1
|
||||
printf "."
|
||||
((loop_count++))
|
||||
if [ $loop_count == 6 ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
printf "\n"
|
||||
# archive dmesg.txt and nwipe logs prior to launching nwipe. This is done just
|
||||
# in case there are any display issues and we want to take a look at the dmesg data.
|
||||
/usr/bin/archive_log.sh
|
||||
|
||||
Reference in New Issue
Block a user