def _is_globalzone():
    '''
    Check if we are running in the globalzone
    '''
    if not __grains__['kernel'] == 'SunOS':
        return False

    zonename = __salt__['cmd.run_all']('zonename')
    if zonename['retcode']:
        return False
    if zonename['stdout'] == 'global':
        return True

    return False
def _is_globalzone ( ) : if not __grains__ [ 'kernel' ] == 'SunOS' : return False zonename = __salt__ [ 'cmd.run_all' ] ( 'zonename' ) if zonename [ 'retcode' ] : return False if zonename [ 'stdout' ] == 'global' : return True return False
Check if we are running in the globalzone