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
4d24e2e2
Commit
4d24e2e2
authored
Oct 21, 2013
by
Scott Sturdivant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
If the output of rcvar isn't a key=value pair, ignore it.
parent
4f139673
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
library/system/service
+11
-2
No files found.
library/system/service
View file @
4d24e2e2
...
...
@@ -793,8 +793,17 @@ class FreeBsdService(Service):
self
.
module
.
fail_json
(
msg
=
"unable to determine rcvar"
)
# In rare cases, i.e. sendmail, rcvar can return several key=value pairs
# Usually there is just one, however.
self
.
rcconf_key
=
rcvars
[
0
]
.
split
(
'='
)[
0
]
# Usually there is just one, however. In other rare cases, i.e. uwsgi,
# rcvar can return extra uncommented data that is not at all related to
# the rcvar. We will just take the first key=value pair we come across
# and hope for the best.
for
rcvar
in
rcvars
:
if
'='
in
rcvar
:
self
.
rcconf_key
=
rcvar
.
split
(
'='
)[
0
]
break
if
self
.
rcconf_key
is
None
:
self
.
module
.
fail_json
(
msg
=
"unable to determine rcvar"
)
return
self
.
service_enable_rcconf
()
...
...
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