sysctl: parse bool value as 0/1 and refactor a little bit
Merge pull request #5787 from jirutka/fix-sysctl-bool

sysctl: parse bool value as 0/1 and refactor a little bit