diff --git a/debian/changelog b/debian/changelog index 59318ebf..d4d102b1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +console-setup (1.178ubuntu11) disco; urgency=medium + + * Call setupcon --force only when debian-installer is active + and always redirect output to /dev/null to not block. (LP: #520546) + + -- Balint Reczey Mon, 28 Jan 2019 21:19:18 +0700 + console-setup (1.178ubuntu10) disco; urgency=medium * No-change rebuild to pick up any new keyboard data. Resolves crash diff --git a/debian/keyboard-configuration.postinst b/debian/keyboard-configuration.postinst index ee9390b7..e44cf19b 100644 --- a/debian/keyboard-configuration.postinst +++ b/debian/keyboard-configuration.postinst @@ -79,35 +79,42 @@ if [ "$1" = "configure" -a ! -L "$CONFIGFILE" ]; then db_set keyboard-configuration/store_defaults_in_debconf_db true fi -if type plymouth >/dev/null && plymouth --ping; then - # setting the keymap breaks with plymouth in raw mode, and setting the - # font will currently also break if on vgacon - if type setupcon >/dev/null 2>&1; then - setupcon --save-only - fi -elif keyboard_present; then +if [ -d /lib/debian-installer ]; +then if [ "$DISPLAY" ] && which setxkbmap >/dev/null; then setxkbmap -option '' -model "$model" "$layout" "$variant" "$options" || true # setting the font corrupts X # setting up the keyboard breaks wayland if type setupcon >/dev/null 2>&1; then - setupcon --save-only + # We redirect the output so that postinst does not block when ScrollLock is on + setupcon --save-only >/dev/null 2>/dev/null || true cat >&2 </dev/null 2>&1; then - setupcon --force --save + setupcon --force --save >/dev/null 2>/dev/null || true fi ;; esac fi +else + # Setting the keymap breaks plymouth in raw mode, and setting the + # font will currently also break if on vgacon. + # Setting the font also corrupts X and postinst may be running with + # stripped environment thus we can't even detect X easily. + setupcon --save-only >/dev/null 2>/dev/null || true + cat >&2 <