diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index cb5fcbc79..f2fd3f369 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -703,7 +703,12 @@ sub mkinitrd_dracut { # update etc/dracut.conf open($DRACUTCONF, '>', "$rootimg_dir/etc/dracut.conf"); - print $DRACUTCONF qq{dracutmodules+="xcat nfs base network kernel-modules"\n}; + if (-d glob("/usr/share/dracut/modules.d/[0-9]*fadump")){ + print $DRACUTCONF qq{dracutmodules+="xcat nfs base network kernel-modules fadump"\n}; + } + else{ + print $DRACUTCONF qq{dracutmodules+="xcat nfs base network kernel-modules"\n}; + } print $DRACUTCONF qq{add_drivers+="$add_drivers"\n}; print $DRACUTCONF qq{filesystems+="nfs"\n}; close $DRACUTCONF; @@ -733,7 +738,12 @@ sub mkinitrd_dracut { # update etc/dracut.conf open($DRACUTCONF, '>', "$rootimg_dir/etc/dracut.conf"); - print $DRACUTCONF qq{dracutmodules+="xcat nfs base network kernel-modules"\n}; + if (-d glob("/usr/share/dracut/modules.d/[0-9]*fadump")){ + print $DRACUTCONF qq{dracutmodules+="xcat nfs base network kernel-modules fadump"\n}; + } + else{ + print $DRACUTCONF qq{dracutmodules+="xcat nfs base network kernel-modules"\n}; + } print $DRACUTCONF qq{add_drivers+="$add_drivers"\n}; close $DRACUTCONF; } else {