mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Fixed memtotal for 64bits NetBSD systems
This commit is contained in:
parent
53d2ac059a
commit
9c53137777
@ -298,6 +298,8 @@ def _memdata(osdata):
|
||||
sysctl = salt.utils.which('sysctl')
|
||||
if sysctl:
|
||||
mem = __salt__['cmd.run']('{0} -n hw.physmem'.format(sysctl))
|
||||
if (osdata['kernel'] == 'NetBSD' and mem.startswith('-')):
|
||||
mem = __salt__['cmd.run']('{0} -n hw.physmem64'.format(sysctl))
|
||||
grains['mem_total'] = str(int(mem) / 1024 / 1024)
|
||||
elif osdata['kernel'] == 'SunOS':
|
||||
prtconf = '/usr/sbin/prtconf 2>/dev/null'
|
||||
|
Loading…
Reference in New Issue
Block a user