sysctl: simplify the pty sysctl logic