Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-unixfs
Commits
4ac6db9a
Commit
4ac6db9a
authored
Nov 16, 2014
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ipfs1/mount: text + unmounting
parent
13c390b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
cmd/ipfs/mount_unix.go
cmd/ipfs/mount_unix.go
+17
-0
No files found.
cmd/ipfs/mount_unix.go
View file @
4ac6db9a
...
...
@@ -3,6 +3,11 @@
package
main
import
(
"fmt"
"os"
"os/signal"
"syscall"
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/gonuts/flag"
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/commander"
...
...
@@ -90,9 +95,21 @@ func doMount(node *core.IpfsNode, fsdir, nsdir string) error {
}
}
fmt
.
Printf
(
"mounted ipfs at %s
\n
"
,
fsdir
)
fmt
.
Printf
(
"mounted ipns at %s
\n
"
,
nsdir
)
// setup node state, so that it can be cancelled
node
.
Mounts
.
Ipfs
=
fsmount
node
.
Mounts
.
Ipns
=
nsmount
// wait until we kill
sigc
:=
make
(
chan
os
.
Signal
,
1
)
signal
.
Notify
(
sigc
,
syscall
.
SIGHUP
,
syscall
.
SIGINT
,
syscall
.
SIGTERM
,
syscall
.
SIGQUIT
)
<-
sigc
fmt
.
Println
(
"unmounting..."
)
node
.
Close
()
return
nil
}
...
...
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