2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-01 00:57:37 +00:00

Turn on hostname from dhcp request in SLE15 stateless

This commit is contained in:
Jarrod Johnson
2018-08-11 19:42:46 -04:00
parent d1ed2cf041
commit a3743ea12b

View File

@@ -1948,6 +1948,9 @@ sub generic_post { # This function is meant to leave the image in a state approx
if (-e "$rootimg_dir/etc/sysconfig/clock") {
system("sed -i 's!\\(HWCLOCK=\\).*!\\1\"--localtime\"!' $rootimg_dir/etc/sysconfig/clock");
}
if (-e "$rootimg_dir/etc/sysconfig/network/dhcp") {
system("sed -i 's!^DHCLIENT_SET_HOSTNAME=\\\"no\\\"!DHCLIENT_SET_HOSTNAME=\\\"yes\\\"!' $rootimg_dir/etc/sysconfig/network/dhcp");
}
unlink("$rootimg_dir/dev/null");
system("mknod $rootimg_dir/dev/null c 1 3");