<s> '''<STR_LIT>''' <EOL> from __future__ import absolute_import <EOL> import salt . utils <EOL> __virtualname__ = '<STR_LIT>' <EOL> def __virtual__ ( ) : <EOL> '''<STR_LIT>''' <EOL> if salt . utils . is_windows ( ) : <EOL> return ( False , '<STR_LIT>' ) <EOL> if salt . utils . is_darwin ( ) : <EOL> return ( False , '<STR_LIT>' ) <EOL> if salt . utils . is_sunos ( ) : <EOL> return ( False , '<STR_LIT>' ) <EOL> if not salt . utils . which ( '<STR_LIT>' ) : <EOL> return ( False , '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> return __virtualname__ <EOL> def halt ( ) : <EOL> '''<STR_LIT>''' <EOL> cmd = [ '<STR_LIT>' ] <EOL> ret = __salt__ [ '<STR_LIT>' ] ( cmd , python_shell = False ) <EOL> return ret <EOL> def init ( runlevel ) : <EOL> '''<STR_LIT>''' <EOL> cmd = [ '<STR_LIT>' , '<STR_LIT>' . format ( runlevel ) ] <EOL> ret = __salt__ [ '<STR_LIT>' ] ( cmd , python_shell = False ) <EOL> return ret <EOL> def poweroff ( ) : <EOL> '''<STR_LIT>''' <EOL> cmd = [ '<STR_LIT>' ] <EOL> ret = __salt__ [ '<STR_LIT>' ] ( cmd , python_shell = False ) <EOL> return ret <EOL> def reboot ( at_time = None ) : <EOL> '''<STR_LIT>''' <EOL> cmd = [ '<STR_LIT>' , '<STR_LIT>' , ( '<STR_LIT>' . format ( at_time ) if at_time else '<STR_LIT>' ) ] <EOL> ret = __salt__ [ '<STR_LIT>' ] ( cmd , python_shell = False ) <EOL> return ret <EOL> def shutdown ( at_time = None ) : <EOL> '''<STR_LIT>''' <EOL> cmd = [ '<STR_LIT>' , '<STR_LIT>' , ( '<STR_LIT>' . format ( at_time ) if at_time else '<STR_LIT>' ) ] <EOL> ret = __salt__ [ '<STR_LIT>' ] ( cmd , python_shell = False ) <EOL> return ret </s>
