mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
In the current code, after the function check_pnetids() and the function verify_precon() are called, $? from each function is used twice successively. It is used for the first time in the condition of the IF statement, while for the second time as return code of the current function. In bash, $? can be used to get the return code, but only for the first time directly after the previous function is called. Afterwards, $? will be reset to "0". Thus, the right return code can not be get, if $? is used second time. To solve the problem, using $? for the second time should be avoided. Signed-off-by: Wenjia Zhang <wenjia@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>