-Fix driver name syntax on dracut mode
-Fix permission preservation on dracut module copy-in git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6052 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
a927d6c4e5
commit
fe22e2c980
@ -7,7 +7,7 @@ use lib "$::XCATROOT/lib/perl";
|
||||
|
||||
use File::Basename;
|
||||
use File::Path;
|
||||
use File::Copy;
|
||||
use File::Copy qw/copy cp mv move/;
|
||||
use File::Find;
|
||||
use Getopt::Long;
|
||||
use Cwd qw(realpath);
|
||||
@ -476,8 +476,11 @@ sub getlibs {
|
||||
sub mkinitrd_dracut {
|
||||
mkpath("$rootimg_dir/usr/share/dracut/modules.d/97xcat");
|
||||
foreach (<$fullpath/dracut/*>) {
|
||||
copy($_,"$rootimg_dir/usr/share/dracut/modules.d/97xcat");
|
||||
my $perm = (stat($_))[2];
|
||||
cp($_,"$rootimg_dir/usr/share/dracut/modules.d/97xcat");
|
||||
chmod($perm&07777,"$rootimg_dir/usr/share/dracut/modules.d/97xcat/".basename($_));
|
||||
}
|
||||
foreach (@ndrivers) { s/\.ko$//; }
|
||||
system("chroot '$rootimg_dir' dracut -d '".join(' ',@ndrivers)."' -m 'xcat base' /tmp/initrd.$$.gz");
|
||||
move("$rootimg_dir/tmp/initrd.$$.gz","$destdir/initrd.gz");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user