diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2017-07-09 19:06:34 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2017-07-09 19:06:34 +0200 |
commit | 65733d1fda46497babb0d0f19d4a741ee4462d07 (patch) | |
tree | 894c3ea0d1078564fa5f7fe7901ab94706247cde | |
parent | 64466225988069fdbb662516b79fe409a83a9037 (diff) | |
download | imagefish-65733d1fda46497babb0d0f19d4a741ee4462d07.tar.gz |
grub2 support in blacklist
-rwxr-xr-x | scripts/config-blacklist-module.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/config-blacklist-module.sh b/scripts/config-blacklist-module.sh index e490a83..4af599d 100755 --- a/scripts/config-blacklist-module.sh +++ b/scripts/config-blacklist-module.sh @@ -8,7 +8,13 @@ if test "$image" = ""; then exit 1 fi +if virt-cat -a "$image" /etc/grub2-efi.cfg >/dev/null; then + bootedit="/etc/grub2-efi.cfg:s/linuxefi/linuxefi rd.driver.blacklist=${module}/" +else + bootedit="/boot/extlinux/extlinux.conf:s/append/append rd.driver.blacklist=${module}/" +fi + set -ex virt-customize -a "$image" --no-network \ - --edit "/boot/extlinux/extlinux.conf:s/append/append rd.driver.blacklist=${module}/" \ + --edit "$bootedit" \ --write "/etc/modprobe.d/blacklist-${module}.conf:blacklist ${module}" |