Compare commits

...

4 Commits

2 changed files with 17 additions and 5 deletions

View File

@ -20,6 +20,18 @@ The **patch** part changes is incremented if multiple releases happen the same m
### Security
## [24.01] 2024-01-12
### Changed
* ignore one of the errors in disklabel, bioctl and atactl due to incompatible disk types
## [23.06] 2023-06-05
### Changed
* command "rcctl ls failed" exits with 1 if enabled daemon is not running, but there is no error
## [23.03] 2023-03-16
### Added

View File

@ -3,7 +3,7 @@
PROGNAME="dump-server-state"
REPOSITORY="https://gitea.evolix.org/evolix/dump-server-state"
VERSION="23.03"
VERSION="24.01"
readonly VERSION
dump_dir=
@ -296,7 +296,7 @@ task_disks() {
last_result=$(${disklabel_bin} "${disk}" 2>&1 > "${dump_dir}/partitions-${disk}")
last_rc=$?
if [ ${last_rc} -eq 0 ]; then
if [ ${last_rc} -eq 0 ] || { [ ${last_rc} -ne 0 ] && [ "${last_result}" = "disklabel: DIOCGDINFO: Input/output error" ]; }; then
debug "* disklabel ${disk} OK"
else
debug "* disklabel ${disk} ERROR"
@ -312,7 +312,7 @@ task_disks() {
last_result=$(${bioctl_bin} "${disk}" 2>&1 > "${dump_dir}/bioctl-${disk}")
last_rc=$?
if [ ${last_rc} -eq 0 ] || { [ ${last_rc} -ne 0 ] && [ "${last_result}" = "bioctl: DIOCINQ: Inappropriate ioctl for device" ]; }; then
if [ ${last_rc} -eq 0 ] || { [ ${last_rc} -ne 0 ] && [ "${last_result}" = "bioctl: DIOCINQ: Inappropriate ioctl for device" ]; } || { [ ${last_rc} -ne 0 ] && [ "${last_result}" = "bioctl: BIOCINQ: Input/output error" ]; }; then
debug "* bioctl ${disk} OK"
else
debug "* bioctl ${disk} ERROR"
@ -328,7 +328,7 @@ task_disks() {
last_result=$(${atactl_bin} "${disk}" 2>&1 > "${dump_dir}/atactl-${disk}")
last_rc=$?
if [ ${last_rc} -eq 0 ] || { [ ${last_rc} -ne 0 ] && [ "${last_result}" = "atactl: ATA device returned error register 0" ]; }; then
if [ ${last_rc} -eq 0 ] || { [ ${last_rc} -ne 0 ] && [ "${last_result}" = "atactl: ATA device returned error register 0" ]; } || { [ ${last_rc} -ne 0 ] && [ "${last_result}" = "atactl: ATAIOCCOMMAND failed: Input/output error" ]; }; then
debug "* atactl ${disk} OK"
else
debug "* atactl ${disk} ERROR"
@ -432,7 +432,7 @@ task_rcctl() {
last_result=$(${rcctl_bin} ls failed > "${dump_dir}/rcctl-failed-services.txt")
last_rc=$?
if [ ${last_rc} -eq 0 ]; then
if [ ${last_rc} -eq 0 ] || [ ${last_rc} -eq 1 ]; then
debug "* failed services OK"
else
debug "* failed services ERROR"