#NEWLINE# def __virtual__( ) : #NEWLINE# #INDENT# '\n    Only work on Ubuntu\n    ' #NEWLINE# if salt . utils . systemd . booted ( __context__ ) : #NEWLINE# #INDENT# return ( False , 'The upstart execution module failed to load: this system was booted with systemd.' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( __grains__ [ 'os' ] in ( 'Ubuntu' , 'Linaro' , 'elementary OS' , 'Mint' ) ) : #NEWLINE# #INDENT# return __virtualname__ #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( __grains__ [ 'os' ] in ( 'Debian' , 'Raspbian' ) ) : #NEWLINE# #INDENT# debian_initctl = '/sbin/initctl' #NEWLINE# if os . path . isfile ( debian_initctl ) : #NEWLINE# #INDENT# initctl_version = salt . modules . cmdmod . _run_quiet ( ( debian_initctl + ' version' ) ) #NEWLINE# if ( 'upstart' in initctl_version ) : #NEWLINE# #INDENT# return __virtualname__ #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return ( False , 'The upstart execution module failed to load:  the system must be Ubuntu-based, or Debian-based with upstart support.' )