2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-04-29 03:27:47 +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 b544840a8b
commit 1baa668632

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");