mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 15:16:41 +08:00
add default runc root path
This commit is contained in:
@@ -195,7 +195,7 @@ func readRuncOpts() (RuncOpts, error) {
|
|||||||
// read runc root path
|
// read runc root path
|
||||||
root := os.Getenv("RUNC_ROOT")
|
root := os.Getenv("RUNC_ROOT")
|
||||||
if root == "" {
|
if root == "" {
|
||||||
return opts, fmt.Errorf("RUNC_ROOT not set")
|
root = "/run/runc"
|
||||||
}
|
}
|
||||||
abs, err := filepath.Abs(root)
|
abs, err := filepath.Abs(root)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
2
main.go
2
main.go
@@ -110,7 +110,7 @@ func Shutdown() {
|
|||||||
|
|
||||||
func validConnector(s string) {
|
func validConnector(s string) {
|
||||||
if _, ok := enabledConnectors[s]; !ok {
|
if _, ok := enabledConnectors[s]; !ok {
|
||||||
fmt.Printf("invalid connector type: %s", s)
|
fmt.Printf("invalid connector type: %s\n", s)
|
||||||
var connectors []string
|
var connectors []string
|
||||||
for k, _ := range enabledConnectors {
|
for k, _ := range enabledConnectors {
|
||||||
connectors = append(connectors, k)
|
connectors = append(connectors, k)
|
||||||
|
|||||||
Reference in New Issue
Block a user