1. The log reported verification errors while also
showing an entry in the log that said "[SUCCESS] Blanked /dev/...".
The blanked device message now shows [FAILURE] /dev/... may not be blanked"
if any verification errors are detected for a specific drive.
2. If a verification error occurred, the error would be correctly
shown in the GUI and in the logs but the summary table drive status
would show 'ERASED' not 'FAILED'. Now corrected so that the tables
drive status field shows 'FAILED' if any verification error is detected.
Prior to this it was marking the status as 'FAILED' only if the O.S
detected write errors. In practise most drive errors are detected
by the write I/O process on syncing but this will now detect errors not
recognised by the O.S. and found by the verification process. Despite
this the textual log and GUI correcty reported verification errors.
3. The final log message "Nwipe exited successfully" was checking for
fatal errors but ignoring non fatal errors despite being reported in
the log.
The final message now reads
either "Nwipe Exited Succesfully" if no fatal and non fatal errors were
detected. Alternatively it displays ...
"Nwipe exited with errors, check the log & summary table for individual drive status."
if any fatal OR non fatal errors are detected.
The shutdown command that nwipe currently uses is
"shutdown -P +1 "Broadcast shutdown message".
While the above command works works fine on Ubuntu 18.04 LTS it
does not work on the version of shutdown used in buildroot, failing
with the error:
"shutdown -H and -P flags can only be used along with -h flag"
Luckily there is a shutdown command with options that work correctly
on both buildroot (ShredOS) and Ubuntu 18.04 LTS, this is
shutdown -Ph +1 "Broadcast shutdown message". i.e. the option -h has been added.
This bug only occurs when you resize the terminal while
on the drive selection screen, then switch to method, rounds
or blanking. To the right of the message the text background
is now blue and not white and random box characters appear.
To me it seems to be a bug not in nwipe but in curses, however
placing double quotes around the message fixes the problem. I
also found that the contents of the message appeared to trigger
the problem, possibly the '=' symbol, however the fact that
the main selection text does not require the quotes is most odd.
Still, this simple fix seems to get rid of the problem.
If submitting pull requests, you must `make format` prior to commiting code and submitting a pull request otherwise you pull request will fail the CI that checks formatting.
If submitting pull requests, you must `make format` prior to commiting code and submitting a pull request otherwise you pull request will fail the CI that checks formatting.
1. Prior to this fix, if a user aborted a multi drive using control-C,
and if some of the drives had completed their wipe either
successfully or with a I/O failures, the summary log would say
UABORTED for all drives. UABORTED is acceptable status for drives that
hadn't completed their wipe but for drives that had completed the wipe,
the summary table should have gave either a ERASED or FAILED status
message. This fix corrects the summary status when using control-c to
abort a multi drive wipe where some drives have completed and some have
not.
2. If I wipe was selected but not started and then the user used
control-C to abort nwipe, the summary table would possibly
intermittently be displayed showing the last drive wiped. The correct
behaviour is that no summary table is displayed if the wipe hasn't been
started yet. This fix corrects the behaviour of the summary table when
control-c is used and a drive has been selected for wiping but not
started, in this scenario the summary table is NOT displayed.
3. When nwipe exits it always prints the message "nwipe successfully
exited". To make this single line message more informative it now
reports a different message depending upon the wipe status.
These four messages are:
"Nwipe was aborted by the user. Check the summary table for the drive
status" - When the user aborts during a wipe.
"Nwipe was aborted by the user prior to the wipe starting."
"Nwipe exited with fatal errors, check the summary table for individual
drive status." - When one or more drives failed.
"Nwipe successfully completed. See summary table for details." - When
selected drives were all erased without error.
... and reduce confusion about lowercase and uppercase option. All options are now defaulting to show as lowercase in the GUI except Start which can only be invoked with SHIFT S to prevent accidental start of wipe. Unless someone enjoys pressing additionally SHIFT for B and R and V and all the other options I'd propose it might be time to remove unneeded code for this :)
This commit adds nwipes banner version number and OS info derived from /proc/version to the nwipe log. This information may be useful when a user has an issue and submits a log file.