base: dump-server-state.sh upstream release 23.03
This commit is contained in:
parent
81d8774885
commit
7ab102376f
|
@ -67,6 +67,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
* nagios-nrpe: check_ipsecctl.sh is never used standalone for check_vpn, always called by check_ipsecctl_critiques.sh
|
* nagios-nrpe: check_ipsecctl.sh is never used standalone for check_vpn, always called by check_ipsecctl_critiques.sh
|
||||||
* evobackup: zzz_evobackup upstream release 22.12, and call zzz_evobackup with bash
|
* evobackup: zzz_evobackup upstream release 22.12, and call zzz_evobackup with bash
|
||||||
* base: install bash, now needed for zzz_evobackup script
|
* base: install bash, now needed for zzz_evobackup script
|
||||||
|
* base: dump-server-state.sh upstream release 23.03
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
PROGNAME="dump-server-state"
|
PROGNAME="dump-server-state"
|
||||||
REPOSITORY="https://gitea.evolix.org/evolix/dump-server-state"
|
REPOSITORY="https://gitea.evolix.org/evolix/dump-server-state"
|
||||||
|
|
||||||
VERSION="22.03"
|
VERSION="23.03"
|
||||||
readonly VERSION
|
readonly VERSION
|
||||||
|
|
||||||
dump_dir=
|
dump_dir=
|
||||||
|
@ -293,7 +293,7 @@ task_disks() {
|
||||||
for disk in ${disks}; do
|
for disk in ${disks}; do
|
||||||
disklabel_bin=$(command -v disklabel)
|
disklabel_bin=$(command -v disklabel)
|
||||||
if [ -n "${disklabel_bin}" ]; then
|
if [ -n "${disklabel_bin}" ]; then
|
||||||
last_result=$(${disklabel_bin} "${disk}" 2>/dev/null > "${dump_dir}/partitions-${disk}")
|
last_result=$(${disklabel_bin} "${disk}" 2>&1 > "${dump_dir}/partitions-${disk}")
|
||||||
last_rc=$?
|
last_rc=$?
|
||||||
|
|
||||||
if [ ${last_rc} -eq 0 ]; then
|
if [ ${last_rc} -eq 0 ]; then
|
||||||
|
@ -309,10 +309,10 @@ task_disks() {
|
||||||
|
|
||||||
bioctl_bin=$(command -v bioctl)
|
bioctl_bin=$(command -v bioctl)
|
||||||
if [ -n "${bioctl_bin}" ]; then
|
if [ -n "${bioctl_bin}" ]; then
|
||||||
last_result=$(${bioctl_bin} "${disk}" 2>/dev/null > "${dump_dir}/bioctl-${disk}")
|
last_result=$(${bioctl_bin} "${disk}" 2>&1 > "${dump_dir}/bioctl-${disk}")
|
||||||
last_rc=$?
|
last_rc=$?
|
||||||
|
|
||||||
if [ ${last_rc} -eq 0 ]; then
|
if [ ${last_rc} -eq 0 ] || { [ ${last_rc} -ne 0 ] && [ "${last_result}" = "bioctl: DIOCINQ: Inappropriate ioctl for device" ]; }; then
|
||||||
debug "* bioctl ${disk} OK"
|
debug "* bioctl ${disk} OK"
|
||||||
else
|
else
|
||||||
debug "* bioctl ${disk} ERROR"
|
debug "* bioctl ${disk} ERROR"
|
||||||
|
@ -325,10 +325,10 @@ task_disks() {
|
||||||
|
|
||||||
atactl_bin=$(command -v atactl)
|
atactl_bin=$(command -v atactl)
|
||||||
if [ -n "${atactl_bin}" ]; then
|
if [ -n "${atactl_bin}" ]; then
|
||||||
last_result=$(${atactl_bin} "${disk}" 2>/dev/null > "${dump_dir}/atactl-${disk}")
|
last_result=$(${atactl_bin} "${disk}" 2>&1 > "${dump_dir}/atactl-${disk}")
|
||||||
last_rc=$?
|
last_rc=$?
|
||||||
|
|
||||||
if [ ${last_rc} -eq 0 ]; then
|
if [ ${last_rc} -eq 0 ] || { [ ${last_rc} -ne 0 ] && [ "${last_result}" = "atactl: ATA device returned error register 0" ]; }; then
|
||||||
debug "* atactl ${disk} OK"
|
debug "* atactl ${disk} OK"
|
||||||
else
|
else
|
||||||
debug "* atactl ${disk} ERROR"
|
debug "* atactl ${disk} ERROR"
|
||||||
|
|
Loading…
Reference in a new issue