View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001448 | bareos-core | bconsole | public | 2022-04-08 13:20 | 2022-04-21 10:23 |
Reporter | mdc | Assigned To | bruno-at-bareos | ||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Platform | x86_64 | OS | CentOS | OS Version | stream 8 |
Product Version | 21.1.2 | ||||
Summary | 0001448: Return code in batch mode always 0 | ||||
Description | When using the console in the batch mode, the return code is always 0 also when an error was occurs. | ||||
Steps To Reproduce | When no error occurs : echo "reload" | bconsole;echo $? Connecting to Director localhost:9101 Encryption: TLS_AES_128_GCM_SHA256 TLSv1.3 1000 OK: Bareos Director Version: 21.1.2 (17 March 2022) ... reload reloaded 0 But when en error occurs, for example because of miss configuration, the return code is also 0. echo "reload" | bconsole;echo $? Connecting to Director localhost:9101 Encryption: TLS_AES_128_GCM_SHA256 TLSv1.3 1000 OK: Bareos Director Version: 21.1.2 (17 March 2022) ... reload failed to reload You have messages. 0 It will be better, when an command failed, that the return code will be something other the 0 to detect the error. | ||||
Tags | No tags attached. | ||||
Not an issue, the exit code can't be really anything else than 0, if bconsole doesn't failed. if you want to test the configuration the -t for each daemon is there. You can still propose a code improvement by following our developer guideline by sending a PR to github repository |
|
The way the daemon exit is the "normal" behavior shared by all daemon. This will not be changed. | |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-04-08 13:20 | mdc | New Issue | |
2022-04-11 13:42 | bruno-at-bareos | Note Added: 0004567 | |
2022-04-21 10:23 | bruno-at-bareos | Assigned To | => bruno-at-bareos |
2022-04-21 10:23 | bruno-at-bareos | Status | new => closed |
2022-04-21 10:23 | bruno-at-bareos | Resolution | open => no change required |
2022-04-21 10:23 | bruno-at-bareos | Note Added: 0004574 |