Use persisted peer name if it matches old-style ID

This commit is contained in:
Bryan Boreham committed 2017-01-11 13:14:35 +00:00
1 parent e03c7b1b7c
commit ebcb7f6108
3 files changed
+57 -14

No files matched your search

+5 -4
View File
@@ -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
}