aboutsummaryrefslogtreecommitdiff
path: root/weed/command/shell.go
diff options
context:
space:
mode:
authorhilimd <68371223+hilimd@users.noreply.github.com>2021-11-11 16:00:21 +0800
committerGitHub <noreply@github.com>2021-11-11 16:00:21 +0800
commit34240606f78395345ca7f6d7fe66a223c9bdf072 (patch)
tree914f76c6587989a39fe1c0f421782126248fbe8e /weed/command/shell.go
parentb5389c3b23502da7315dd258715e146be7cc0fc9 (diff)
parent835e2d2ddf959dc8dd234021ac3cde72bd9e9246 (diff)
downloadseaweedfs-34240606f78395345ca7f6d7fe66a223c9bdf072.tar.xz
seaweedfs-34240606f78395345ca7f6d7fe66a223c9bdf072.zip
Merge pull request #87 from chrislusf/master
sync
Diffstat (limited to 'weed/command/shell.go')
-rw-r--r--weed/command/shell.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/weed/command/shell.go b/weed/command/shell.go
index 93bb69522..3ba51aec1 100644
--- a/weed/command/shell.go
+++ b/weed/command/shell.go
@@ -37,7 +37,7 @@ func runShell(command *Command, args []string) bool {
util.LoadConfiguration("security", false)
shellOptions.GrpcDialOption = security.LoadClientTLS(util.GetViper(), "grpc.client")
- if *shellOptions.Masters == "" && *shellInitialFiler == "" {
+ if *shellOptions.Masters == "" {
util.LoadConfiguration("shell", false)
v := util.GetViper()
cluster := v.GetString("cluster.default")
@@ -45,15 +45,14 @@ func runShell(command *Command, args []string) bool {
cluster = *shellCluster
}
if cluster == "" {
- *shellOptions.Masters, *shellInitialFiler = "localhost:9333", "localhost:8888"
+ *shellOptions.Masters = "localhost:9333"
} else {
*shellOptions.Masters = v.GetString("cluster." + cluster + ".master")
*shellInitialFiler = v.GetString("cluster." + cluster + ".filer")
+ fmt.Printf("master: %s filer: %s\n", *shellOptions.Masters, *shellInitialFiler)
}
}
- fmt.Printf("master: %s filer: %s\n", *shellOptions.Masters, *shellInitialFiler)
-
shellOptions.FilerAddress = pb.ServerAddress(*shellInitialFiler)
shellOptions.Directory = "/"