Skip to content

Commit

Permalink
fix issue chroot, rpm -qa error: Failed to initialize NSS library xca…
Browse files Browse the repository at this point in the history
  • Loading branch information
immarvin committed Mar 26, 2018
1 parent 36923de commit b4cb546
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions xCAT-server/share/xcat/netboot/rh/genimage
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ sub majversion {
my $version = shift;
my $majorrel;

if ($osver =~ /^\D*(\d*)[.\d]*$/) {
if ($osver =~ /^\D*(\d*)[.\d]*.*$/) {
$majorrel = $1;
}

Expand Down Expand Up @@ -141,6 +141,9 @@ sub umount_chroot {
#only remove the /dev in rootimg directory if it is not a mount point
system("findmnt $rootimage_dir/dev/ >/dev/null 2>&1 || rm -rf $rootimage_dir/dev/*");
}

#rpm complains "Failed to initialize NSS library" when /dev/urandom does not exist, leave /dev/urandom
use_devurandom();
}

#check whether a dir is NFS mounted
Expand Down Expand Up @@ -375,8 +378,6 @@ unless ($onlyinitrd) {


mount_chroot($rootimg_dir);
use_devurandom();

my %pkg_hash = imgutils::get_package_names($pkglist);

my $index = 1;
Expand Down

0 comments on commit b4cb546

Please sign in to comment.