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
6d19150b
Commit
6d19150b
authored
Jun 17, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3242 from bcoca/mount_findbin
now mount/unmount binaries are searched for instead of hardcoded
parents
bfcead8c
c9c7b016
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
library/system/mount
+5
-3
No files found.
library/system/mount
View file @
6d19150b
...
...
@@ -197,12 +197,13 @@ def unset_mount(**kwargs):
def
mount
(
module
,
**
kwargs
):
""" mount up a path or remount if needed """
mount_bin
=
module
.
get_bin_path
(
'mount'
)
name
=
kwargs
[
'name'
]
if
os
.
path
.
ismount
(
name
):
cmd
=
[
'/bin/mount'
,
'-o'
,
'remount'
,
name
]
cmd
=
[
mount_bin
,
'-o'
,
'remount'
,
name
]
else
:
cmd
=
[
'/bin/mount'
,
name
]
cmd
=
[
mount_bin
,
name
]
rc
,
out
,
err
=
module
.
run_command
(
cmd
)
if
rc
==
0
:
...
...
@@ -213,8 +214,9 @@ def mount(module, **kwargs):
def
umount
(
module
,
**
kwargs
):
""" unmount a path """
umount_bin
=
module
.
get_bin_path
(
'umount'
)
name
=
kwargs
[
'name'
]
cmd
=
[
'/bin/umount'
,
name
]
cmd
=
[
umount_bin
,
name
]
rc
,
out
,
err
=
module
.
run_command
(
cmd
)
if
rc
==
0
:
...
...
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