Update postinst

This commit is contained in:
ferrreo 2023-09-03 12:18:56 +01:00 committed by GitHub
parent 1b7934c035
commit d7cf73115b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

14
debian/postinst vendored
View File

@ -28,19 +28,7 @@ fi
# Add nvidia support if an nvidia card is detected # Add nvidia support if an nvidia card is detected
if lspci -k | grep -iEA3 '^[[:alnum:]]{2}:[[:alnum:]]{2}.*VGA|3D|DISPLAY' | grep -i nvidia && lspci -k | grep -iEA3 '^[[:alnum:]]{2}:[[:alnum:]]{2}.*VGA|3D|DISPLAY' | grep -i -E 'kernel modules|kernel driver' | grep -i nvidia if lspci -k | grep -iEA3 '^[[:alnum:]]{2}:[[:alnum:]]{2}.*VGA|3D|DISPLAY' | grep -i nvidia && lspci -k | grep -iEA3 '^[[:alnum:]]{2}:[[:alnum:]]{2}.*VGA|3D|DISPLAY' | grep -i -E 'kernel modules|kernel driver' | grep -i nvidia
then then
if cat /etc/booster.yaml | grep -i 'nvidia' cp -f /etc/booster-nvidia.yaml /etc/booster.yaml
then
true
else
echo 'modules_force_load: nvidia,usbhid' >> /etc/booster.yaml
fi
else
if cat /etc/booster.yaml | grep -i 'usbhid'
then
true
else
echo 'modules_force_load: usbhid' >> /etc/booster.yaml
fi
fi fi
cp -f /usr/lib/booster/update-initramfs /usr/sbin/update-initramfs cp -f /usr/lib/booster/update-initramfs /usr/sbin/update-initramfs