diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index 3289000a1..17e06fd19 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -2020,7 +2020,10 @@ sub generic_post { #This function is meant to leave the image in a state approxi if(-e "$rootimg_dir/etc/rc3.d/S61xcatpostinit"){ unlink("$rootimg_dir/etc/rc3.d/S61xcatpostinit"); } - + + if (!-d "$rootimg_dir/opt/xcat/") { + mkdir "$rootimg_dir/opt/xcat/"; + } if(-e "$rootimg_dir/usr/lib/systemd/"){ #if systemd is the service management framework for the diskless image