mirror of
https://github.com/oneclickvirt/basics.git
synced 2025-10-13 12:23:45 +08:00
update
This commit is contained in:
@@ -5,16 +5,16 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
func checkSysctlVersion(path string) bool {
|
||||
out, err := exec.Command(path, "-h").Output()
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
if strings.Contains(string(out), "error") {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
// func checkSysctlVersion(path string) bool {
|
||||
// out, err := exec.Command(path, "-h").Output()
|
||||
// if err != nil {
|
||||
// return false
|
||||
// }
|
||||
// if strings.Contains(string(out), "error") {
|
||||
// return false
|
||||
// }
|
||||
// return true
|
||||
// }
|
||||
|
||||
func getSysctlValue(path, key string) (string, error) {
|
||||
out, err := exec.Command(path, "-n", key).Output()
|
||||
|
Reference in New Issue
Block a user