pika-i915-config/pika-nvidia-config/debian/postinst

18 lines
661 B
Plaintext
Raw Normal View History

2023-08-21 17:03:42 +02:00
#! /bin/bash
if [ -f /boot/refind_linux.conf ]
then
if cat /boot/refind_linux.conf | grep -i 'nvidia-drm.modeset=1' > /dev/null 2>&1
then
true
else
if cat /boot/refind_linux.conf | grep -i 'nvidia-drm.modeset=0' > /dev/null 2>&1
then
sed -i "s#nvidia-drm.modeset=0#nvidia-drm.modeset=1" /boot/refind_linux.conf
else
sed -i "s#root=#nvidia-drm.modeset=1 root=#" /boot/refind_linux.conf
fi
fi
else
echo "Warning: You seem to not be using refind as a boot manager as PikaOS normally does, so make sure to add nvidia-drm.modeset=1 to your linux cmd if you have an nvidia card."
fi