Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: mitsuhiko/salt
...
head fork: mitsuhiko/salt
Checking mergeability… Don't worry, you can still create the pull request.
  • 7 commits
  • 2 files changed
  • 0 commit comments
  • 3 contributors
Showing with 12 additions and 1 deletion.
  1. +7 −0 salt/grains/core.py
  2. +5 −1 salt/modules/upstart.py
View
7 salt/grains/core.py
@@ -154,6 +154,11 @@ def _memdata(osdata):
if sysctl:
mem = __salt__['cmd.run']('{0} -n hw.physmem'.format(sysctl)).strip()
grains['mem_total'] = str(int(mem) / 1024 / 1024)
+ elif osdata['kernel'] == 'SunOS':
+ for line in __salt__['cmd.run']('/usr/sbin/prtconf 2>/dev/null').split('\n'):
+ comps = line.split(' ')
+ if comps[0].strip() == 'Memory' and comps[1].strip() == 'size:':
+ grains['mem_total'] = int(comps[2].strip())
elif osdata['kernel'] == 'Windows':
for line in __salt__['cmd.run']('SYSTEMINFO /FO LIST').split('\n'):
comps = line.split(':')
@@ -275,6 +280,8 @@ def _ps(osdata):
bsd_choices = ('FreeBSD', 'NetBSD', 'OpenBSD', 'MacOS')
if osdata['os'] in bsd_choices:
grains['ps'] = 'ps auxwww'
+ if osdata['os'] == 'SunOS':
+ grains['ps'] = '/usr/ucb/ps auxwww'
elif osdata['os'] == 'Windows':
grains['ps'] = 'tasklist.exe'
elif osdata.get('virtual', '') == 'openvzhn':
View
6 salt/modules/upstart.py
@@ -29,7 +29,7 @@
start on ((((filesystem and runlevel [!06]) and started dbus) and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1 or stopped udev-fallback-graphics)) or runlevel PREVLEVEL=S)
stop on runlevel [016]
-DO NOT use this module on red hat systems, as red hat systems should use the
+DO NOT use this module on Red Hat systems, as Red Hat systems should use the
rh_service module, since red hat systems support chkconfig
'''
# Import Python libs
@@ -121,6 +121,10 @@ def _sysv_is_enabled(name):
def _iter_service_names():
+ '''
+ Detect all of the service names available to upstart via init configuration
+ files and via classic sysv init scripts
+ '''
found = set()
for line in glob.glob('/etc/init.d/*'):
name = os.path.basename(line)

No commit comments for this range

Something went wrong with that request. Please try again.