Question 380
Original unofficial RHEL 10 RHCSA skill-check scenario: A scheduled script runs commands sequentially but ignores a failed prerequisite and then performs a destructive step. Which ongoing practice best prevents a recurrence?
Explanation
Correct Answer
In this RHEL 10 system administration case: A scheduled script runs commands sequentially but ignores a failed prerequisite and then performs a destructive step. Underlying reason: Command sequencing alone does not enforce dependency success. The most direct, approved resolution is: Stop on failed prerequisites using explicit status checks and a safe error branch. Confirm it by checking: The destructive action is skipped when its input validation fails. Sustain the fix by: Require failure injection tests for administrative scripts. This is the INTENDED response for the best ongoing operational safeguard. It is a knowledge-check explanation, not a verified hands-on Red Hat exam answer;
Incorrect Answers
Monitor exit codes and restore tests. That is not sufficient for the reported RHEL task, because command sequencing alone does not enforce dependency success.
Document required script arguments with examples. That is not sufficient for the reported RHEL task, because command sequencing alone does not enforce dependency success.
Test missing-data as well as no-match cases. That is not sufficient for the reported RHEL task, because command sequencing alone does not enforce dependency success.