Mounter can now only be specified through flag
This commit is contained in:
parent
9d5d84ebfb
commit
8cd8f6b6cd
11 changed files with 53 additions and 25 deletions
pkg/s3
|
@ -26,8 +26,9 @@ type s3qlMounter struct {
|
|||
}
|
||||
|
||||
const (
|
||||
s3qlCmdMkfs = "mkfs.s3ql"
|
||||
s3qlCmdMount = "mount.s3ql"
|
||||
s3qlCmdMkfs = "mkfs.s3ql"
|
||||
s3qlCmdMount = "mount.s3ql"
|
||||
s3qlCmdUnmount = "umount.s3ql"
|
||||
)
|
||||
|
||||
func newS3qlMounter(bucket string, cfg *Config) (Mounter, error) {
|
||||
|
@ -78,6 +79,13 @@ func (s3ql *s3qlMounter) Mount(targetPath string) error {
|
|||
return s3qlCmd(s3qlCmdMount, append(args, s3ql.options...), nil)
|
||||
}
|
||||
|
||||
func (s3ql *s3qlMounter) Unmount(targetPath string) error {
|
||||
args := []string{
|
||||
targetPath,
|
||||
}
|
||||
return s3qlCmd(s3qlCmdUnmount, append(args, s3ql.options...), nil)
|
||||
}
|
||||
|
||||
func s3qlCmd(s3qlCmd string, args []string, stdin io.Reader) error {
|
||||
cmd := exec.Command(s3qlCmd, args...)
|
||||
if stdin != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue