summaryrefslogtreecommitdiff
path: root/x11-drivers/nvidia-drivers
diff options
context:
space:
mode:
Diffstat (limited to 'x11-drivers/nvidia-drivers')
-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
}