FOGProject / fos

FOG Operating System
31 stars 33 forks source link

Fix invalid tests + minor cleanup #26

Closed Quazz closed 5 years ago

Quazz commented 5 years ago

Removed unused variable in restoreUUIDInformation

Changed invalid tests in restoreUUIDInformation (would always return true if initial test succeeded even if sgdisk failed) You can test this locally like so: [[ 1 -eq 1 ]] && false || echo 0 (or even true && false || echo 0 will echo 0

Replaced egrep with grep -E since egrep is deprecated

Replaced != with -ne since $part_number is expected to be a number in restoreAllEbrs

Improved readability of test in processSfDisk

Changed file tests from simple string test, to checking if file exists and if it is empty or not.

Quazz commented 5 years ago

While I don't think this resolves any or all the issues people have been experiencing, I do think it should give us more information going forward with errors being properly triggered and such.

Sebastian-Roth commented 5 years ago

@Quazz Had another look through the changes and I find those all helpful. Will merge this in now.