Skip to content

Commit

Permalink
Revert "change owner of folder to current user after creating zfs dat…
Browse files Browse the repository at this point in the history
…aset (close tuna#89)"

This reverts commit a58e6d3 and
re-opens tuna#89.

Signed-off-by: 王邈 <[email protected]>
  • Loading branch information
shankerwangmiao committed Mar 25, 2019
1 parent a58e6d3 commit ff3e690
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions worker/zfs_hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package worker
import (
"fmt"
"os"
"os/user"
"strings"

"github.com/codeskyblue/go-sh"
Expand Down Expand Up @@ -41,14 +40,6 @@ func (z *zfsHook) preJob() error {
if err := sh.Command("sudo", "zfs", "set", "mountpoint="+workingDir, zfsDataset).Run(); err != nil {
return err
}
usr, err := user.Current()
if err != nil {
return err
}
logger.Infof("Chown %s to %s(%s)", workingDir, usr.Uid, usr.Username)
if err := sh.Command("sudo", "chown", usr.Uid, workingDir).Run(); err != nil {
return err
}
}
return nil
}

0 comments on commit ff3e690

Please sign in to comment.