diff options
| author | Chris Lu <chris.lu@gmail.com> | 2013-08-28 10:39:15 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2013-08-28 10:39:15 -0700 |
| commit | 2e70cc8be77d0047139ea56864df74477387f2f3 (patch) | |
| tree | ee22a5e5d2a426b835fc14d473078977082f82bf /go/weed/master.go | |
| parent | 37b231b5dc76e90d02aca9fe471dc7371e902ac2 (diff) | |
| download | seaweedfs-2e70cc8be77d0047139ea56864df74477387f2f3.tar.xz seaweedfs-2e70cc8be77d0047139ea56864df74477387f2f3.zip | |
default to use os.TempDir() instead of hard coded "/tmp"
Diffstat (limited to 'go/weed/master.go')
| -rw-r--r-- | go/weed/master.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/go/weed/master.go b/go/weed/master.go index 6d01ef3bc..2d7adef1f 100644 --- a/go/weed/master.go +++ b/go/weed/master.go @@ -10,6 +10,7 @@ import ( "encoding/json" "errors" "net/http" + "os" "runtime" "strconv" "strings" @@ -32,7 +33,7 @@ var cmdMaster = &Command{ var ( mport = cmdMaster.Flag.Int("port", 9333, "http listen port") - metaFolder = cmdMaster.Flag.String("mdir", "/tmp", "data directory to store mappings") + metaFolder = cmdMaster.Flag.String("mdir", os.TempDir(), "data directory to store mappings") volumeSizeLimitMB = cmdMaster.Flag.Uint("volumeSizeLimitMB", 32*1024, "Default Volume Size in MegaBytes") mpulse = cmdMaster.Flag.Int("pulseSeconds", 5, "number of seconds between heartbeats") confFile = cmdMaster.Flag.String("conf", "/etc/weedfs/weedfs.conf", "xml configuration file") |
