device-init
device-init copied to clipboard
Error with hostname set servername
There is a problem with device-init
sudo device-init hostname set server1
sudo: unable to resolve host server1
panic: runtime error: index out of range
goroutine 1 [running]:
github.com/hypriot/device-init/cmd.activeInterfaces(0x0, 0x0, 0x0)
/opt/gopath/src/github.com/hypriot/device-init/cmd/hostname_set.go:123 +0x31c
github.com/hypriot/device-init/cmd.setHostname(0x108abdfc, 0x1, 0x1)
/opt/gopath/src/github.com/hypriot/device-init/cmd/hostname_set.go:86 +0x50c
github.com/hypriot/device-init/cmd.glob.func5(0x670c30, 0x108605c0, 0x1, 0x1)
/opt/gopath/src/github.com/hypriot/device-init/cmd/hostname_set.go:39 +0xa4
github.com/spf13/cobra.(*Command).execute(0x670c30, 0x10860578, 0x1, 0x1, 0x0, 0x0)
/opt/gopath/src/github.com/hypriot/device-init/Godeps/_workspace/src/github.com/spf13/cobra/command.go:569 +0x664
github.com/spf13/cobra.(*Command).ExecuteC(0x670d28, 0x670c30, 0x0, 0x0)
/opt/gopath/src/github.com/hypriot/device-init/Godeps/_workspace/src/github.com/spf13/cobra/command.go:656 +0x440
github.com/spf13/cobra.(*Command).Execute(0x670d28, 0x0, 0x0)
/opt/gopath/src/github.com/hypriot/device-init/Godeps/_workspace/src/github.com/spf13/cobra/command.go:615 +0x28
github.com/hypriot/device-init/cmd.Execute()
/opt/gopath/src/github.com/hypriot/device-init/cmd/root.go:53 +0x20
main.main()
/opt/gopath/src/github.com/hypriot/device-init/main.go:28 +0x14
Is any solution here ?
https://github.com/hypriot/device-init/pull/43