Summary: | [patch] sysrc ignores the -i ignore flag | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Yann Kerherve <yannk> | ||||
Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
Status: | New --- | ||||||
Severity: | Affects Many People | CC: | dteske, emaste, markj | ||||
Priority: | --- | Keywords: | patch | ||||
Version: | 12.0-STABLE | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
dteske@ can you review? |
Created attachment 204709 [details] simple patch to sysrc for -i There is no functional difference between -q and -i. The -i flag is documented as: Ignore unknown variables. The -q flag is documented as: Quiet. Disable verbose and hide certain errors. When combined with ā-Lā and one or more name arguments, provide only exit status and no output. The current behavior is observed: $ sysrc unknown sysrc: unknown variable 'unknown' $ echo $? 1 $ sysrc -q unknown $ echo $? 1 $ sysrc -i unknown $ echo $? 1 When the following behavior is expected: $ sysrc -i unknown sysrc: unknown variable 'unknown' $ echo $? 0 Combining with the -q flag $ sysrc -q -i unknown $ echo $? 0 The following patch: - Makes -i exit code 0 - Makes -i not suppress output unless combined with -q