2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-21 02:30:21 +00:00

Verify if kernel-modules-extra exists before adding

This commit is contained in:
Mark Gurevich
2020-08-17 16:06:37 -04:00
parent cebf36e991
commit 2111baba47

View File

@@ -1079,9 +1079,9 @@ sub mkinitrd_dracut {
#update etc/dracut.conf
open($DRACUTCONF, '>', "$rootimg_dir/etc/dracut.conf");
my $dracutmodulelist = "xcat nfs base network kernel-modules kernel-modules-extra syslog";
my $dracutmodulelist = "xcat nfs base network kernel-modules syslog";
foreach (qw/systemd systemd-initrd dracut-systemd fadump/) {
foreach (qw/systemd systemd-initrd dracut-systemd fadump kernel-modules-extra/) {
my ($dir) = glob($dracutmoduledir . "[0-9]*" . $_);
if (-d $dir) {
$dracutmodulelist .= " $_";
@@ -1120,9 +1120,9 @@ sub mkinitrd_dracut {
$perm = (stat("$fullpath/$dracutdir/installkernel"))[2];
chmod($perm & 07777, "$dracutmpath/installkernel");
my $dracutmodulelist = "xcat nfs base network kernel-modules kernel-modules-extra syslog";
my $dracutmodulelist = "xcat nfs base network kernel-modules syslog";
foreach (qw/systemd systemd-initrd dracut-systemd fadump/) {
foreach (qw/systemd systemd-initrd dracut-systemd fadump kernel-modules-extra/) {
my ($dir) = glob($dracutmoduledir . "[0-9]*" . $_);
if (-d $dir) {
$dracutmodulelist .= " $_";