(fsType string)
| 51 | } |
| 52 | |
| 53 | func autoextend(fsType string) error { |
| 54 | for _, d := range driveKeys { |
| 55 | err := exec.Command("sfdisk", "-d", d).Run() |
| 56 | if err != nil { |
| 57 | log.Printf("No partition table found on device %s. Skipping.", d) |
| 58 | continue |
| 59 | } |
| 60 | if err := extend(d, fsType); err != nil { |
| 61 | if stopOnError { |
| 62 | return err |
| 63 | } |
| 64 | |
| 65 | log.Printf("Could not extend partition on device %s. Skipping", d) |
| 66 | continue |
| 67 | } |
| 68 | } |
| 69 | return nil |
| 70 | } |
| 71 | |
| 72 | func extend(d, fsType string) error { |
| 73 | mountpoint := "/mnt/tmp" |