Actions
Bug #16882
closedGeneric method sysctl_value
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Reviewed
Fix check:
Checked
Regression:
Description
creating a Generic Method to manage sysctl values, that would be call sysctl_value, and take 3 parameters:
- the key
- the value,
- the file name where to put the value in /etc/sysctl.d
It would check the keys/value running sysctl -n key, and:
If it success, with the correct value, report a Success (wherever the key is defined)
If its an error, it would add it in the file given as a parameter (creating it if necessary), run sysctl -p, and report a Repaired status
- create the correct key/value in the file given as a parameter
- run sysctl -p
- run sysctl -n to check if the value is set or not (given the precedence of files, it may not be used)
report based on the return of sysctl -n
Actions