check if machineid is non-empty

This commit is contained in:
Sebastien Blot 2022-04-28 09:32:57 +02:00
parent be977d1cc4
commit 7af45e9494

View file

@ -65,7 +65,7 @@ func generatePassword(length int) string {
// string.
func generateIDPrefix() (string, error) {
prefix, err := machineid.ID()
if err == nil {
if err == nil && prefix != "" {
return prefix, nil
}
log.Debugf("failed to get machine-id with usual files: %s", err)