From 76feee14c44d2abb8275f9e7ba965570f24e6180 Mon Sep 17 00:00:00 2001 From: "Shannon V. Davidson" Date: Thu, 3 Dec 2020 19:40:39 -0600 Subject: [PATCH] added host IP address to dhcpd.conf template --- etc/dhcp/default-dhcpd.conf | 2 +- etc/dhcp/static-dhcpd.conf | 2 +- go.mod | 88 ++++++++++++++++++------------------- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/etc/dhcp/default-dhcpd.conf b/etc/dhcp/default-dhcpd.conf index a4394ea4..14cade45 100644 --- a/etc/dhcp/default-dhcpd.conf +++ b/etc/dhcp/default-dhcpd.conf @@ -16,7 +16,7 @@ option ipxe.no-pxedhcp 1; option architecture-type code 93 = unsigned integer 16; if exists user-class and option user-class = "iPXE" { - filename "http://192.168.1.1:9873/ipxe/${mac:hexhyp}"; + filename "http://{{$.Ipaddr}}:9873/ipxe/${mac:hexhyp}"; } else { if option architecture-type = 00:0B { filename "/warewulf/ipxe/bin-arm64-efi/snp.efi"; diff --git a/etc/dhcp/static-dhcpd.conf b/etc/dhcp/static-dhcpd.conf index 61a1592f..01ff4020 100644 --- a/etc/dhcp/static-dhcpd.conf +++ b/etc/dhcp/static-dhcpd.conf @@ -16,7 +16,7 @@ option ipxe.no-pxedhcp 1; option architecture-type code 93 = unsigned integer 16; if exists user-class and option user-class = "iPXE" { - filename "http://192.168.1.1:9873/ipxe/${mac:hexhyp}"; + filename "http://{{$.Ipaddr}}:9873/ipxe/${mac:hexhyp}"; } else { if option architecture-type = 00:0B { filename "/warewulf/ipxe/bin-arm64-efi/snp.efi"; diff --git a/go.mod b/go.mod index 2ca950f4..d443b1ce 100644 --- a/go.mod +++ b/go.mod @@ -3,57 +3,57 @@ module github.com/hpcng/warewulf go 1.15 require ( - github.com/BurntSushi/toml v0.3.1 // indirect - github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 // indirect - github.com/beorn7/perks v1.0.1 // indirect + github.com/BurntSushi/toml v0.3.1 + github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 + github.com/beorn7/perks v1.0.1 github.com/brotherpowers/ipsubnet v0.0.0-20170914094241-30bc98f0a5b1 - github.com/containerd/containerd v1.3.2 // indirect + github.com/containerd/containerd v1.3.2 github.com/containers/image/v5 v5.7.0 - github.com/containers/libtrust v0.0.0-20190913040956-14b96171aa3b // indirect - github.com/containers/ocicrypt v1.0.3 // indirect - github.com/containers/storage v1.23.6 // indirect - github.com/docker/distribution v2.7.1+incompatible // indirect - github.com/docker/docker v1.4.2-0.20191219165747-a9416c67da9f // indirect - github.com/docker/docker-credential-helpers v0.6.3 // indirect - github.com/docker/go-connections v0.4.0 // indirect - github.com/docker/go-metrics v0.0.1 // indirect - github.com/docker/go-units v0.4.0 // indirect + github.com/containers/libtrust v0.0.0-20190913040956-14b96171aa3b + github.com/containers/ocicrypt v1.0.3 + github.com/containers/storage v1.23.6 + github.com/docker/distribution v2.7.1+incompatible + github.com/docker/docker v1.4.2-0.20191219165747-a9416c67da9f + github.com/docker/docker-credential-helpers v0.6.3 + github.com/docker/go-connections v0.4.0 + github.com/docker/go-metrics v0.0.1 + github.com/docker/go-units v0.4.0 github.com/fatih/color v1.9.0 // indirect - github.com/ghodss/yaml v1.0.0 // indirect - github.com/gogo/protobuf v1.3.1 // indirect - github.com/golang/protobuf v1.4.2 // indirect - github.com/gorilla/mux v1.7.4 // indirect - github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a // indirect + github.com/ghodss/yaml v1.0.0 + github.com/gogo/protobuf v1.3.1 + github.com/golang/protobuf v1.4.2 + github.com/gorilla/mux v1.7.4 + github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a github.com/kelseyhightower/envconfig v1.4.0 - github.com/klauspost/compress v1.11.1 // indirect - github.com/klauspost/pgzip v1.2.5 // indirect - github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a // indirect + github.com/klauspost/compress v1.11.1 + github.com/klauspost/pgzip v1.2.5 + github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a github.com/manifoldco/promptui v0.8.0 - github.com/mattn/go-colorable v0.1.6 // indirect - github.com/mattn/go-isatty v0.0.12 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect - github.com/mtrmac/gpgme v0.1.2 // indirect - github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/mattn/go-colorable v0.1.6 + github.com/mattn/go-isatty v0.0.12 + github.com/matttproud/golang_protobuf_extensions v1.0.1 + github.com/mtrmac/gpgme v0.1.2 + github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6 github.com/opencontainers/umoci v0.4.6 - github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_golang v1.1.0 // indirect - github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 // indirect - github.com/prometheus/common v0.6.0 // indirect - github.com/prometheus/procfs v0.0.3 // indirect - github.com/russross/blackfriday/v2 v2.0.1 // indirect - github.com/sirupsen/logrus v1.7.0 // indirect + github.com/pkg/errors v0.9.1 + github.com/prometheus/client_golang v1.1.0 + github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 + github.com/prometheus/common v0.6.0 + github.com/prometheus/procfs v0.0.3 + github.com/russross/blackfriday/v2 v2.0.1 + github.com/sirupsen/logrus v1.7.0 github.com/spf13/cobra v1.1.1 - github.com/ulikunitz/xz v0.5.8 // indirect - github.com/vbauerster/mpb/v5 v5.3.0 // indirect - go.etcd.io/bbolt v1.3.5 // indirect - golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9 // indirect - golang.org/x/net v0.0.0-20200602114024-627f9648deb9 // indirect - golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a // indirect - golang.org/x/sys v0.0.0-20200909081042-eff7692f9009 // indirect - google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect - google.golang.org/grpc v1.27.0 // indirect - google.golang.org/protobuf v1.24.0 // indirect - gopkg.in/square/go-jose.v2 v2.3.1 // indirect + github.com/ulikunitz/xz v0.5.8 + github.com/vbauerster/mpb/v5 v5.3.0 + go.etcd.io/bbolt v1.3.5 + golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9 + golang.org/x/net v0.0.0-20200602114024-627f9648deb9 + golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a + golang.org/x/sys v0.0.0-20200909081042-eff7692f9009 + google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 + google.golang.org/grpc v1.27.0 + google.golang.org/protobuf v1.24.0 + gopkg.in/square/go-jose.v2 v2.3.1 gopkg.in/yaml.v2 v2.3.0 )