Print additional infos about errors to std_out.

This commit is contained in:
2019-06-09 17:08:15 +02:00
parent 7013d8644f
commit ef5848f4ea
8 changed files with 105 additions and 14 deletions

View File

@@ -111,6 +111,7 @@ for _disk in $disks ; do
if [ "$retval" = "0" ]; then
echolog "\t--- \"info_${_disk}.txt\" successfully saved ---"
else
print_error_stdout "Cannot save identification info for disk $disk:\n $(cat $err_Log)"
echolog "\t[ERROR] Cannot save identification info for disk $disk: \n\t`$cat $err_Log`\n"
fi
fi
@@ -158,6 +159,7 @@ for _disk in $disks ; do
if [ "$retval" = "0" ]; then
echolog "\t--- \"fdisk_${_disk}.txt\" successfully saved ---"
else
print_error_stdout "Cannot save partition tables for $disk (info file):\n $(cat $err_Log)"
echolog "\t[ERROR] Cannot save partition tables for $disk (info file): \n\t`$cat $err_Log`\n"
fi
fi
@@ -185,6 +187,7 @@ for _disk in $disks ; do
if [ "$retval" = "0" ]; then
echolog "\t--- \"${_disk}.mbr\" successfully saved ---"
else
print_error_stdout "Cannot save master boot record of disk $disk:\n $(cat $err_Log)"
echolog "\t[ERROR] Cannot save master boot record of disk $disk: \n\t`$cat $err_Log`\n"
fi
else
@@ -214,6 +217,7 @@ for _disk in $disks ; do
if [ "$retval" = "0" ]; then
echolog "\t--- \"${_disk}-partitions.sfdisk\" successfully saved ---"
else
print_error_stdout "Cannot save partition table of disk $disk:\n $(cat $err_Log)"
echolog "\t[ERROR] Cannot save partition table of disk $disk: \n\t`$cat $err_Log`\n"
fi
else
@@ -252,6 +256,7 @@ for _disk in $disks ; do
if [ "$retval" = "0" ]; then
echolog "\t--- \"boot_sec-${_part}.bin\" successfully saved ---"
else
print_error_stdout "Cannot save boot record of partition $partition:\n $(cat $err_Log)"
echolog "\t[ERROR] Cannot save boot record of partition $partition: \n\t`$cat $err_Log`\n"
fi
else
@@ -294,6 +299,7 @@ for _disk in $disks ; do
if [ "$retval" = "0" ]; then
echolog "\t--- \"fdisk_${_disk}.txt\" successfully saved ---"
else
print_error_stdout "Cannot save partition tables for $disk (info file)\n $(cat $err_Log)"
echolog "\t[ERROR] Cannot save partition tables for $disk (info file): \n\t`$cat $err_Log`\n"
fi
fi
@@ -322,6 +328,7 @@ for _disk in $disks ; do
if [ "$retval" = "0" ]; then
echolog "\t--- \"${_disk}-partitions.sgdisk\" successfully saved ---"
else
print_error_stdout "Cannot save partition table of disk $disk: \n $(cat $err_Log)"
echolog "\t[ERROR] Cannot save partition table of disk $disk: \n\t`$cat $err_Log`\n"
fi
else