Use persisted peer name if it matches old-style ID
This commit is contained in:
1 parent
e03c7b1b7c
commit
ebcb7f6108
3 files changed
+57
-14
No files matched your search
@@ -7,11 +7,12 @@ import (
|
||||
)
|
||||
|
||||
func uniqueID(args []string) error {
|
||||
if len(args) != 1 {
|
||||
cmdUsage("unique-id", "<host-root>")
|
||||
if len(args) != 2 {
|
||||
cmdUsage("unique-id", "<db-prefix> <host-root>")
|
||||
}
|
||||
hostRoot := args[0]
|
||||
uid, err := weavenet.GetSystemPeerName(hostRoot)
|
||||
dbPrefix := args[0]
|
||||
hostRoot := args[1]
|
||||
uid, err := weavenet.GetSystemPeerName(dbPrefix, hostRoot)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user