support genimage -l for dracut mode
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15431 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		@@ -674,7 +674,6 @@ unless ($dracutmode) { #in dracut mode, we delegate all this activity
 | 
			
		||||
#if ($dracutmode) {
 | 
			
		||||
    # modify etc/rc.sysinit, prevent remounting
 | 
			
		||||
    # TODO: need to find one way to prevent remounting
 | 
			
		||||
 | 
			
		||||
    if (-f "$rootimg_dir/etc/rc.sysinit") {
 | 
			
		||||
        my $SYSINITFILE;
 | 
			
		||||
        my $TMPSYSINITFILE;
 | 
			
		||||
@@ -814,9 +813,18 @@ sub mkinitrd_dracut {
 | 
			
		||||
        xdie "the mode: $mode is not supported by genimage";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    system("chroot $rootimg_dir dracut -f /tmp/initrd.$$.gz $kernelver");
 | 
			
		||||
    my $additional_options=undef;
 | 
			
		||||
    if($rootlimit)
 | 
			
		||||
    {
 | 
			
		||||
	open(my $ETC_CMDLINE,">","$rootimg_dir/tmp/cmdline");
 | 
			
		||||
	print $ETC_CMDLINE qq{rootlimit=$rootlimit\n};
 | 
			
		||||
	close $ETC_CMDLINE;
 | 
			
		||||
	$additional_options= qq{--include /tmp/cmdline /etc/cmdline};
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    system("chroot $rootimg_dir dracut $additional_options -f /tmp/initrd.$$.gz $kernelver");
 | 
			
		||||
    print "the initial ramdisk for $mode is generated successfully.\n";
 | 
			
		||||
    move("$rootimg_dir/tmp/initrd.$$.gz", "$destdir/initrd-$mode.gz");
 | 
			
		||||
    move("$rootimg_dir/tmp/initrd.$$.gz", "$destdir/initrd-$mode.gz"); 
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub mkinitrd {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user