Skip to content

Commit

Permalink
check for ubuntu in the right away
Browse files Browse the repository at this point in the history
  • Loading branch information
debarshri committed Mar 31, 2020
1 parent 105782b commit 20446b2
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions node.go
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@ package machina

import (
"fmt"
"strings"
"time"

"github.com/google/uuid"
@@ -56,12 +55,8 @@ func (n *Node) String() string {
func (n *Node) DetermineOS() (osType.OsType, error) {

client := n.SSHClient()
out, err := client.Collect("uname -a")
if err != nil {
return nil, err
}

if strings.Contains(out, "Ubuntu") {
if err := client.Run([]string{"ls /etc/lsb-release"}); err == nil {
return &osType.Ubuntu{}, err
}

0 comments on commit 20446b2

Please sign in to comment.