mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Have sysctl print out a more useful error message when it detects that the
user has attempted to write to a read only, tunable value.
This commit is contained in:
parent
bd6fb64bb3
commit
9b4b73b7ba
1 changed files with 6 additions and 1 deletions
|
|
@ -197,7 +197,12 @@ parse(char *string)
|
|||
errx(1, "oid '%s' isn't a leaf node", bufp);
|
||||
|
||||
if (!(kind&CTLFLAG_WR))
|
||||
errx(1, "oid '%s' is read only", bufp);
|
||||
if (kind & CTLFLAG_TUN) {
|
||||
fprintf(stderr, "Tunable values are set in /boot/loader.conf and require a reboot to take effect.\n");
|
||||
errx(1, "oid '%s' is a tunable.", bufp);
|
||||
} else {
|
||||
errx(1, "oid '%s' is read only", bufp);
|
||||
}
|
||||
|
||||
if ((kind & CTLTYPE) == CTLTYPE_INT ||
|
||||
(kind & CTLTYPE) == CTLTYPE_UINT ||
|
||||
|
|
|
|||
Loading…
Reference in a new issue