#!/bin/bash

export MODPATH="/Rocky"
source ./functions

modules=$(ls /Rocky/modules/)
for module in $modules
do
    version=${module##*-}
    if [ "$version" == `uname -m` ];then
        initrd="initrd.gz"
    else
        initrd="initrd-$version.gz"
    fi
    LOGFILE=$LOG_FILE mkTmpfstab.sh -f "$TARGET/etc/fstab" -t "/tmp/fstab"
    mkinitrd "$TARGET"/boot/$initrd $module  --without-usb --without-multipath --fstab="/tmp/fstab" -f
done
