diff --git a/postinst.d/10-nvidia-drivers b/postinst.d/10-nvidia-drivers index 1822186..41ec1f0 100755 --- a/postinst.d/10-nvidia-drivers +++ b/postinst.d/10-nvidia-drivers @@ -1,3 +1,8 @@ #!/usr/bin/env sh + +[ -e "$0.disabled" ] && exit 0 +which make >/dev/null 2>&1 || exit 0 +[ -d "/usr/src/nvidia-drivers" ] || exit 0 + echo Build NVIDIA module... >&2 exec make -C /usr/src/nvidia-drivers SYSSRC="/lib/modules/$1/build" install diff --git a/postinst.d/90-dracut b/postinst.d/90-dracut index edf8127..ef2bfe9 100755 --- a/postinst.d/90-dracut +++ b/postinst.d/90-dracut @@ -1,3 +1,7 @@ #!/usr/bin/env sh + +[ -e "$0.disabled" ] && exit 0 +which dracut >/dev/null 2>&1 || exit 0 + echo "dracut..." >&2 exec dracut --force --kver "$1" diff --git a/postinst.d/zz-grub-mkconfig b/postinst.d/zz-grub-mkconfig index 47a9558..9ee6f7c 100755 --- a/postinst.d/zz-grub-mkconfig +++ b/postinst.d/zz-grub-mkconfig @@ -1,3 +1,6 @@ #!/usr/bin/env sh -echo "grub-mkconfig..." >&2 + +[ -e "$0.disabled" ] && exit 0 +which grub-mkconfig >/dev/null 2>&1 || exit 0 + exec grub-mkconfig -o /boot/grub/grub.cfg