mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
p2v: virt-p2v-make-disk: Use a more robust way to get the latest kernel version.
Fedora/i686 does not have a package called 'kernel', so the command
'rpm -q kernel' fails. In any case the method used wasn't exactly
very robust.
The new method is based on how febootstrap used to do this.
This updates commit d723b352f8.
This commit is contained in:
@@ -113,8 +113,8 @@ EOF
|
||||
cat > $tmpdir/post-install <<'EOF'
|
||||
#!/bin/bash
|
||||
# Rebuild the initramfs.
|
||||
version=` rpm -q kernel | sort -rV | head -1 | sed 's/kernel-//' `
|
||||
dracut -f --kver $version
|
||||
latest_version="$(cd /lib/modules; ls -1vr | head -1)"
|
||||
dracut -f --kver $latest_version
|
||||
EOF
|
||||
# Double quotes because we want $tmpdir to be expanded:
|
||||
extra_args="
|
||||
|
||||
Reference in New Issue
Block a user