Merge pull request #20730 from clnperez/sysinfo-match-ip-case

Match case for IP variables in sysinfo pkg
This commit is contained in:
David Calavera 2016-03-03 08:48:57 -08:00
commit c7ffb4137d
2 changed files with 4 additions and 4 deletions

View file

@ -19,10 +19,10 @@ type SysInfo struct {
IPv4ForwardingDisabled bool IPv4ForwardingDisabled bool
// Whether bridge-nf-call-iptables is supported or not // Whether bridge-nf-call-iptables is supported or not
BridgeNfCallIptablesDisabled bool BridgeNFCallIPTablesDisabled bool
// Whether bridge-nf-call-ip6tables is supported or not // Whether bridge-nf-call-ip6tables is supported or not
BridgeNfCallIP6tablesDisabled bool BridgeNFCallIP6TablesDisabled bool
// Whether the cgroup has the mountpoint of "devices" or not // Whether the cgroup has the mountpoint of "devices" or not
CgroupDevicesEnabled bool CgroupDevicesEnabled bool

View file

@ -50,8 +50,8 @@ func New(quiet bool) *SysInfo {
sysInfo.CgroupDevicesEnabled = ok sysInfo.CgroupDevicesEnabled = ok
sysInfo.IPv4ForwardingDisabled = !readProcBool("/proc/sys/net/ipv4/ip_forward") sysInfo.IPv4ForwardingDisabled = !readProcBool("/proc/sys/net/ipv4/ip_forward")
sysInfo.BridgeNfCallIptablesDisabled = !readProcBool("/proc/sys/net/bridge/bridge-nf-call-iptables") sysInfo.BridgeNFCallIPTablesDisabled = !readProcBool("/proc/sys/net/bridge/bridge-nf-call-iptables")
sysInfo.BridgeNfCallIP6tablesDisabled = !readProcBool("/proc/sys/net/bridge/bridge-nf-call-ip6tables") sysInfo.BridgeNFCallIP6TablesDisabled = !readProcBool("/proc/sys/net/bridge/bridge-nf-call-ip6tables")
// Check if AppArmor is supported. // Check if AppArmor is supported.
if _, err := os.Stat("/sys/kernel/security/apparmor"); !os.IsNotExist(err) { if _, err := os.Stat("/sys/kernel/security/apparmor"); !os.IsNotExist(err) {