mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Merge pull request #5252 from kvbik/disabling-upstart-job
be consistent about .override use
This commit is contained in:
commit
665965f0e8
@ -138,11 +138,11 @@ def _service_is_upstart(name):
|
||||
def _upstart_is_disabled(name):
|
||||
'''
|
||||
An Upstart service is assumed disabled if a manual stanza is
|
||||
placed in /etc/init/[name].conf.override.
|
||||
placed in /etc/init/[name].override.
|
||||
NOTE: An Upstart service can also be disabled by placing "manual"
|
||||
in /etc/init/[name].conf.
|
||||
'''
|
||||
return os.access('/etc/init/{0}.conf.override'.format(name), os.R_OK)
|
||||
return os.access('/etc/init/{0}.override'.format(name), os.R_OK)
|
||||
|
||||
|
||||
def _upstart_is_enabled(name):
|
||||
@ -362,7 +362,7 @@ def _upstart_enable(name):
|
||||
'''
|
||||
Enable an Upstart service.
|
||||
'''
|
||||
override = '/etc/init/{0}.conf.override'.format(name)
|
||||
override = '/etc/init/{0}.override'.format(name)
|
||||
if os.access(override, os.R_OK):
|
||||
os.unlink(override)
|
||||
return _upstart_is_enabled(name)
|
||||
|
Loading…
Reference in New Issue
Block a user