diff --git a/kdumpctl b/kdumpctl index b52dea5..1bdbb07 100755 --- a/kdumpctl +++ b/kdumpctl @@ -143,6 +143,18 @@ rebuild_kdump_initrd() return 0 } +check_and_generate_vconsole_conf() +{ + if [[ ! -e /etc/vconsole.conf ]]; then + dwarn "/etc/vconsole.conf does not exist, trying to set keymap to us to reduce the initramfs size." + if [[ -x "$(command -v localectl)" ]] ; then + if localectl list-keymaps | grep -q "^us$"; then + localectl set-keymap us 2>/dev/null + fi + fi + fi +} + rebuild_initrd() { local _ret @@ -152,6 +164,8 @@ rebuild_initrd() return 1 fi + check_and_generate_vconsole_conf + if [[ $DEFAULT_DUMP_MODE == "fadump" ]]; then rebuild_fadump_initrd else