validator: implement PXE template
This commit is contained in:
parent
e9ddee7ef1
commit
24a530b515
5 changed files with 144 additions and 27 deletions
|
|
@ -7,22 +7,22 @@ import (
|
|||
"path/filepath"
|
||||
)
|
||||
|
||||
var tftpDir string
|
||||
|
||||
func main() {
|
||||
var staticDir string
|
||||
var studentsFile string
|
||||
|
||||
var bind = flag.String("bind", ":8081", "Bind port/socket")
|
||||
flag.StringVar(&studentsFile, "students", "./students.csv", "Path to a CSV file containing students list")
|
||||
flag.StringVar(&staticDir, "static", "./static/", "Directory containing static files")
|
||||
flag.StringVar(&ARPTable, "arp", ARPTable, "Path to ARP table")
|
||||
//var tftpdLogs = flag.String("tftpd", "/var/logs/tftpd.log", "Path to TFTPd logs")
|
||||
flag.StringVar(&tftpDir, "tftpdir", "/var/tftp/", "Path to TFTPd directory")
|
||||
flag.Parse()
|
||||
|
||||
var err error
|
||||
|
||||
// Sanitize options
|
||||
log.Println("Checking paths...")
|
||||
if staticDir, err = filepath.Abs(staticDir); err != nil {
|
||||
if tftpDir, err = filepath.Abs(tftpDir); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue