diff --git a/profiles/pci/graphic_drivers/profiles.toml b/profiles/pci/graphic_drivers/profiles.toml index 86b8a4a..5bf3305 100644 --- a/profiles/pci/graphic_drivers/profiles.toml +++ b/profiles/pci/graphic_drivers/profiles.toml @@ -36,8 +36,11 @@ conditional_packages = """ """ post_install = """ cat </etc/mkinitcpio.conf.d/10-chwd.conf -# This file is automatically generated by chwd. PLEASE DO NOT EDIT IT. -MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm) +if [[ "$(declare -p MODULES)" =~ "declare -a" ]]; then + MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm) +else + MODULES=($MODULES nvidia nvidia_modeset nvidia_uvm nvidia_drm) +fi EOF mkinitcpio -P """ @@ -74,7 +77,11 @@ conditional_packages = """ post_install = """ cat </etc/mkinitcpio.conf.d/10-chwd.conf # This file is automatically generated by chwd. PLEASE DO NOT EDIT IT. -MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm) +if [[ "$(declare -p MODULES)" =~ "declare -a" ]]; then + MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm) +else + MODULES=($MODULES nvidia nvidia_modeset nvidia_uvm nvidia_drm) +fi EOF mkinitcpio -P """ @@ -155,7 +162,11 @@ post_install = """ else cat </etc/mkinitcpio.conf.d/10-chwd.conf # This file is automatically generated by chwd. PLEASE DO NOT EDIT IT. -MODULES+=(virtio virtio_blk virtio_pci virtio_net) +if [[ "$(declare -p MODULES)" =~ "declare -a" ]]; then + MODULES+=(virtio virtio_blk virtio_pci virtio_net) +else + MODULES=($MODULES virtio virtio_blk virtio_pci virtio_net) +fi EOF mkinitcpio -P fi