Fixes around dhcpd
This commit is contained in:
@@ -35,6 +35,6 @@ if exists user-class and option user-class = "iPXE" {
|
||||
|
||||
subnet {{$.Network}} netmask {{$.Netmask}} {
|
||||
range {{$.RangeStart}} {{$.RangeEnd}};
|
||||
next-server 192.168.1.1;
|
||||
next-server {{$.Ipaddr}};
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,10 @@ if exists user-class and option user-class = "iPXE" {
|
||||
}
|
||||
|
||||
|
||||
subnet {{$.Network}} netmask {{$.Netmask}} {
|
||||
next-server {{$.Ipaddr}};
|
||||
}
|
||||
|
||||
{{- range $nodes := .Nodes}}
|
||||
host {{$.Fqdn}} {
|
||||
hardware ethernet {{$nodes.NetDevs.eth0.Hwaddr}}
|
||||
|
||||
@@ -19,9 +19,9 @@ control:
|
||||
range end: 192.168.1.250
|
||||
assign static: false
|
||||
config file: /etc/dhcp/dhcpd.conf
|
||||
start command: service dhcp start
|
||||
restart command: killall dhcpd -HUP
|
||||
enable command: chkconfig dhcp on
|
||||
start command: systemctl start dhcpd
|
||||
restart command: systemctl restart dhcpd
|
||||
enable command: systemctl enable dhcpd
|
||||
tftp:
|
||||
enabled: true
|
||||
tftproot: /var/lib/tftproot
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"github.com/brotherpowers/ipsubnet"
|
||||
"github.com/hpcng/warewulf/internal/pkg/node"
|
||||
"github.com/hpcng/warewulf/internal/pkg/util"
|
||||
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
"github.com/spf13/cobra"
|
||||
"net"
|
||||
@@ -123,6 +124,9 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
util.ExecInteractive("/bin/sh", "-c", controller.Services.Dhcp.EnableCmd)
|
||||
util.ExecInteractive("/bin/sh", "-c", controller.Services.Dhcp.RestartCmd)
|
||||
|
||||
// Just in case we get here, we've now finished the loop
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user