def _runlevel():
 if ('upstart._runlevel' in __context__):
  return __context__['upstart._runlevel']
 out = __salt__['cmd.run'](['runlevel', '{0}'.format(_find_utmp())], python_shell=False)
 try:
  ret = out.split()[1]
 except IndexError:
  ret = _default_runlevel()
 __context__['upstart._runlevel'] = ret
 return ret

def _runlevel ( ) : if ( 'upstart._runlevel' in __context__ ) : return __context__ [ 'upstart._runlevel' ] out = __salt__ [ 'cmd.run' ] ( [ 'runlevel' , '{0}' . format ( _find_utmp ( ) ) ] , python_shell = False ) try : ret = out . split ( ) [ 1 ] except IndexError : ret = _default_runlevel ( ) __context__ [ 'upstart._runlevel' ] = ret return ret
return the current runlevel .