diff options
-rwxr-xr-x | lib/perf | 3 | ||||
-rwxr-xr-x | root_image | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/perf b/lib/perf new file mode 100755 index 0000000..10c56b8 --- /dev/null +++ b/lib/perf @@ -0,0 +1,3 @@ +#!/bin/bash + +exec $(ls /usr/bin/perf_*|sort -Vr|head -n1) "$@" @@ -155,7 +155,7 @@ update_files() install -m0644 "$ktest_dir/lib/fstab" "$MNT/etc/fstab" install -m0755 "$ktest_dir/lib/rc.local" "$MNT/etc/rc.local" install -m0755 "$ktest_dir/lib/rc-local.service" "$MNT/lib/systemd/system/rc-local.service" - rm "$MNT/lib/systemd/system/rc-local.service.d/debian.conf" + rm -f "$MNT/lib/systemd/system/rc-local.service.d/debian.conf" touch "$MNT/etc/resolv.conf" chmod 644 "$MNT/etc/resolv.conf" @@ -202,6 +202,10 @@ ZZ rm -f "$MNT/lib/udev/rules.d/*hdparm*" echo $(hostname)-kvm >"$MNT/etc/hostname" + + # Use most recent version of perf installed, instead of failing if it + # doesn't match the kernel version: + install -m0755 "$ktest_dir/lib/perf" "$MNT/usr/local/bin/perf" } update_packages() |