Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
89abc35e
Commit
89abc35e
authored
Jan 02, 2014
by
jctanner
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5167 from jaspernbrouwer/devel
service_module: Fixed false positive on initctl as enable_cmd
parents
288a6a10
a52ca731
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
library/system/service
+3
-3
No files found.
library/system/service
View file @
89abc35e
...
@@ -431,10 +431,10 @@ class LinuxService(Service):
...
@@ -431,10 +431,10 @@ class LinuxService(Service):
if
check_systemd
(
self
.
name
):
if
check_systemd
(
self
.
name
):
# service is managed by systemd
# service is managed by systemd
self
.
enable_cmd
=
location
[
'systemctl'
]
self
.
enable_cmd
=
location
[
'systemctl'
]
elif
os
.
path
.
exists
(
"/etc/init/
%
s.conf"
%
self
.
name
):
elif
location
[
'initctl'
]
and
os
.
path
.
exists
(
"/etc/init/
%
s.conf"
%
self
.
name
):
# service is managed by upstart
# service is managed by upstart
self
.
enable_cmd
=
location
[
'initctl'
]
self
.
enable_cmd
=
location
[
'initctl'
]
elif
os
.
path
.
exists
(
"/etc/init.d/
%
s"
%
self
.
name
):
elif
location
[
'update-rc.d'
]
and
os
.
path
.
exists
(
"/etc/init.d/
%
s"
%
self
.
name
):
# service is managed by with SysV init scripts, but with update-rc.d
# service is managed by with SysV init scripts, but with update-rc.d
self
.
enable_cmd
=
location
[
'update-rc.d'
]
self
.
enable_cmd
=
location
[
'update-rc.d'
]
else
:
else
:
...
@@ -649,7 +649,7 @@ class LinuxService(Service):
...
@@ -649,7 +649,7 @@ class LinuxService(Service):
return
return
if
self
.
enable
:
if
self
.
enable
:
# make sure the init.d symlinks are created
# make sure the init.d symlinks are created
# otherwise enable might not work
# otherwise enable might not work
(
rc
,
out
,
err
)
=
self
.
execute_command
(
"
%
s
%
s defaults"
\
(
rc
,
out
,
err
)
=
self
.
execute_command
(
"
%
s
%
s defaults"
\
%
(
self
.
enable_cmd
,
self
.
name
))
%
(
self
.
enable_cmd
,
self
.
name
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment