fix: CopyToSystem now correctly uses ExecAndLogSudo
This commit is contained in:
parent
6c48a35180
commit
380c875213
1 changed files with 1 additions and 5 deletions
|
@ -6,7 +6,6 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/klauspost/cpuid/v2"
|
"github.com/klauspost/cpuid/v2"
|
||||||
|
|
||||||
|
@ -317,10 +316,7 @@ func CopyToSystem(isRoot bool, conffile, sysfile string) {
|
||||||
conffile, _ = filepath.Abs(conffile)
|
conffile, _ = filepath.Abs(conffile)
|
||||||
}
|
}
|
||||||
|
|
||||||
conffile = strings.ReplaceAll(conffile, " ", "\\ ")
|
err := command.ExecAndLogSudo(isRoot, false, "cp", "-v", conffile, sysfile)
|
||||||
cmd := fmt.Sprintf("cp -v %s %s", conffile, sysfile)
|
|
||||||
|
|
||||||
err := command.ExecAndLogSudo(isRoot, false, cmd)
|
|
||||||
|
|
||||||
errMsg := ""
|
errMsg := ""
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue