From 3464f21b5cc701dfd6acd9d652ad643c459f1efa Mon Sep 17 00:00:00 2001 From: shibinbin Date: Fri, 25 Oct 2019 17:34:03 +0800 Subject: [PATCH 1/2] fix: weed shell add filer runtime attributes --- weed/command/shell.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/weed/command/shell.go b/weed/command/shell.go index 79f8b8bf9..7a328d8c1 100644 --- a/weed/command/shell.go +++ b/weed/command/shell.go @@ -14,6 +14,12 @@ var ( func init() { cmdShell.Run = runShell // break init cycle shellOptions.Masters = cmdShell.Flag.String("master", "localhost:9333", "comma-separated master servers") + filerHost := cmdShell.Flag.String("filer.host", "localhost", "comma-separated filer server host") + flierPort := cmdShell.Flag.Int64("filer.port", 9333, "comma-separated filer server port") + directory := cmdShell.Flag.String("filer.dir", "/", "comma-separated filer server directory") + shellOptions.FilerHost = *filerHost + shellOptions.FilerPort = *flierPort + shellOptions.Directory = *directory } var cmdShell = &Command{ @@ -24,19 +30,14 @@ var cmdShell = &Command{ `, } -var () func runShell(command *Command, args []string) bool { util.LoadConfiguration("security", false) shellOptions.GrpcDialOption = security.LoadClientTLS(viper.Sub("grpc"), "client") - shellOptions.FilerHost = "localhost" - shellOptions.FilerPort = 8888 - shellOptions.Directory = "/" - shell.RunShell(shellOptions) return true -} +} \ No newline at end of file From fe1f469978eae6ab57d3b2b93ab82a57468302c4 Mon Sep 17 00:00:00 2001 From: shibinbin Date: Fri, 25 Oct 2019 17:39:29 +0800 Subject: [PATCH 2/2] fix : change default filer.port to 8888 --- weed/command/shell.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/command/shell.go b/weed/command/shell.go index 7a328d8c1..eae68c3be 100644 --- a/weed/command/shell.go +++ b/weed/command/shell.go @@ -15,7 +15,7 @@ func init() { cmdShell.Run = runShell // break init cycle shellOptions.Masters = cmdShell.Flag.String("master", "localhost:9333", "comma-separated master servers") filerHost := cmdShell.Flag.String("filer.host", "localhost", "comma-separated filer server host") - flierPort := cmdShell.Flag.Int64("filer.port", 9333, "comma-separated filer server port") + flierPort := cmdShell.Flag.Int64("filer.port", 8888, "comma-separated filer server port") directory := cmdShell.Flag.String("filer.dir", "/", "comma-separated filer server directory") shellOptions.FilerHost = *filerHost shellOptions.FilerPort = *flierPort