diff --git a/config/sources/families/meson-s4t7.conf b/config/sources/families/meson-s4t7.conf index 680d73840c..e0cf60c494 100644 --- a/config/sources/families/meson-s4t7.conf +++ b/config/sources/families/meson-s4t7.conf @@ -186,3 +186,14 @@ function post_family_tweaks_bsp__add_fan_service() { run_host_command_logged cp -R "${SRC}"/packages/bsp/meson-s4t7/${BOARD}/* "${destination}"/ fi } + +function meson_s4t7_board_side_bsp_cli_postrm() { # not run here + if [[ remove == "$1" ]] || [[ abort-install == "$1" ]]; then + cp /usr/share/initramfs-tools/modules /etc/initramfs-tools/modules + fi +} + +function post_family_tweaks_bsp__add_postrm_hook() { + display_alert "$BOARD" "Adding postrm hook to restore /etc/initramfs-tools/modules file" "info" + postrm_functions+=(meson_s4t7_board_side_bsp_cli_postrm) +}