From f17039d37055bc23f31fb63019bdd4f2be9d4c79 Mon Sep 17 00:00:00 2001 From: shoopea Date: Thu, 4 Nov 2021 20:18:18 +0800 Subject: [PATCH] no bin path --- ssh.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ssh.go b/ssh.go index fd679e6..4a2e777 100644 --- a/ssh.go +++ b/ssh.go @@ -112,7 +112,7 @@ func (s *SSHConfig) getSnapshotList() error { var b bytes.Buffer session.Stdout = &b - err = session.Run("TZ=\"" + cfg.Timezone + "\" /usr/sbin/zfs list -H -t snapshot -o name") + err = session.Run("TZ=\"" + cfg.Timezone + "\" zfs list -H -t snapshot -o name") if err != nil { if *debugFlag { log.Printf("SSHConfig.getSnapshotList : %s : session.Run() : %s", s.name, err) @@ -166,7 +166,7 @@ func (s *SSHConfig) getZFSList() error { var b bytes.Buffer session.Stdout = &b - err = session.Run("TZ=\"" + cfg.Timezone + "\" /sbin/zfs list -H -o name,mountpoint") + err = session.Run("TZ=\"" + cfg.Timezone + "\" zfs list -H -o name,mountpoint") if err != nil { if *debugFlag { log.Printf("SSHConfig.getZFSList : %s : session.Run() : %s", s.name, err) @@ -238,7 +238,7 @@ func (s *SSHConfig) getTime() error { var b bytes.Buffer session.Stdout = &b - err = session.Run("TZ=\"" + cfg.Timezone + "\" /usr/bin/date +\"%F %T\"") + err = session.Run("TZ=\"" + cfg.Timezone + "\" date +\"%F %T\"") if err != nil { if *debugFlag { log.Printf("SSHConfig.getTime : %s : session.Run() : %s", s.name, err) @@ -317,7 +317,7 @@ func (s *SSHConfig) createZFS(path string) error { log.Printf("SSHConfig.createZFS : Creating %s:%s", s.name, base) } - err := s.exec("/sbin/zfs create -o mountpoint=none " + base) + err := s.exec("zfs create -o mountpoint=none " + base) if err != nil { if *debugFlag { log.Printf("SSHConfig.createZFS : s.exec(%s) : %s", s.name, err)