diff --git a/xCAT-server-2.0/lib/xcat/plugins/dhcp.pm b/xCAT-server-2.0/lib/xcat/plugins/dhcp.pm index da97ce463..f6a6ced3e 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/dhcp.pm @@ -240,8 +240,12 @@ sub addnode print $omshell "set ip-address = $ip\n"; if ($lstatements) { - print $omshell "set statements = \"$lstatements\"\n"; + $lstatements = 'send host-name \"'.$node.'\";'.$lstatements; + + } else { + $lstatements = 'send host-name \"'.$node.'\";'; } + print $omshell "set statements = \"$lstatements\"\n"; } print $omshell "create\n";