summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-01-05 03:44:09 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-01-05 03:44:09 +0000
commita789425cba891c19d39699becc463802ff73eb3e (patch)
treea640cb50806a39e73df738f82485eba499582610
parent3bc98a6b25056902ccc45ff4f323618fe19cfeef (diff)
x11-drivers/nvidia-drivers : trigger initramfs rebuild, prevent nouveau from loading early
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-390.132.ebuild12
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-440.44.ebuild12
2 files changed, 24 insertions, 0 deletions
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-390.132.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-390.132.ebuild
index a60fe398..07a937c4 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-390.132.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-390.132.ebuild
@@ -279,6 +279,12 @@ src_install-libs() {
fi
}
+_dracut_initramfs_regen() {
+ if [ -x $(which dracut) ]; then
+ dracut -N -f --no-hostonly-cmdline
+ fi
+}
+
pkg_preinst() {
if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
@@ -303,6 +309,9 @@ pkg_postinst() {
elog "speed scale appropriately."
elog
fi
+ if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then
+ _dracut_initramfs_regen
+ fi
}
pkg_prerm() {
@@ -315,4 +324,7 @@ pkg_postrm() {
if ! use libglvnd; then
use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
fi
+ if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then
+ _dracut_initramfs_regen
+ fi
}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-440.44.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-440.44.ebuild
index 5dea7496..61d8b145 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-440.44.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-440.44.ebuild
@@ -277,6 +277,12 @@ src_install-libs() {
fi
}
+_dracut_initramfs_regen() {
+ if [ -x $(which dracut) ]; then
+ dracut -N -f --no-hostonly-cmdline
+ fi
+)
+
pkg_preinst() {
if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
@@ -301,6 +307,9 @@ pkg_postinst() {
elog "speed scale appropriately."
elog
fi
+ if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then
+ _dracut_initramfs_regen
+ fi
}
pkg_prerm() {
@@ -313,4 +322,7 @@ pkg_postrm() {
if ! use libglvnd; then
use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
fi
+ if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then
+ _dracut_initramfs_regen
+ fi
}