Skip to content

Commit

Permalink
Fixed bus_number check
Browse files Browse the repository at this point in the history
  • Loading branch information
paginabianca committed Jul 27, 2020
1 parent a6d3c63 commit ac8dc15
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions builder/proxmox/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,13 @@ func (c *Config) Prepare(raws ...interface{}) ([]string, error) {
if c.CDDrive[idx].Bus == "ide" && c.CDDrive[idx].BusNumber == 2 {
errs = packer.MultiErrorAppend(errs, fmt.Errorf("IDE bus must 2 is used by boot disk"))
}
if c.CDDrive[idx].Bus == "ide" && c.CDDrive[idx].BusNumber <= 3 {
if c.CDDrive[idx].Bus == "ide" && c.CDDrive[idx].BusNumber > 3 {
errs = packer.MultiErrorAppend(errs, fmt.Errorf("IDE bus number can't be higher than 3"))
}
if c.CDDrive[idx].Bus == "sata" && c.CDDrive[idx].BusNumber <= 5 {
if c.CDDrive[idx].Bus == "sata" && c.CDDrive[idx].BusNumber > 5 {
errs = packer.MultiErrorAppend(errs, fmt.Errorf("SATA bus number can't be higher than 5"))
}
if c.CDDrive[idx].Bus == "scsi" && c.CDDrive[idx].BusNumber <= 30 {
if c.CDDrive[idx].Bus == "scsi" && c.CDDrive[idx].BusNumber > 30 {
errs = packer.MultiErrorAppend(errs, fmt.Errorf("SCSI bus number can't be higher than 30"))
}
}
Expand Down

0 comments on commit ac8dc15

Please sign in to comment.