Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
3323861e
Commit
3323861e
authored
Nov 24, 2017
by
zhangxiaoyu-zidif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix binary check for nfs.go
parent
842518d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
nfs.go
pkg/volume/nfs/nfs.go
+3
-3
No files found.
pkg/volume/nfs/nfs.go
View file @
3323861e
...
...
@@ -194,15 +194,15 @@ func (nfsMounter *nfsMounter) CanMount() error {
exec
:=
nfsMounter
.
plugin
.
host
.
GetExec
(
nfsMounter
.
plugin
.
GetPluginName
())
switch
runtime
.
GOOS
{
case
"linux"
:
if
_
,
err
:=
exec
.
Run
(
"
/bin/ls
"
,
"/sbin/mount.nfs"
);
err
!=
nil
{
if
_
,
err
:=
exec
.
Run
(
"
test"
,
"-x
"
,
"/sbin/mount.nfs"
);
err
!=
nil
{
return
fmt
.
Errorf
(
"Required binary /sbin/mount.nfs is missing"
)
}
if
_
,
err
:=
exec
.
Run
(
"
/bin/ls
"
,
"/sbin/mount.nfs4"
);
err
!=
nil
{
if
_
,
err
:=
exec
.
Run
(
"
test"
,
"-x
"
,
"/sbin/mount.nfs4"
);
err
!=
nil
{
return
fmt
.
Errorf
(
"Required binary /sbin/mount.nfs4 is missing"
)
}
return
nil
case
"darwin"
:
if
_
,
err
:=
exec
.
Run
(
"
/bin/ls
"
,
"/sbin/mount_nfs"
);
err
!=
nil
{
if
_
,
err
:=
exec
.
Run
(
"
test"
,
"-x
"
,
"/sbin/mount_nfs"
);
err
!=
nil
{
return
fmt
.
Errorf
(
"Required binary /sbin/mount_nfs is missing"
)
}
}
...
...
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