Commit 421206fd authored by boyska's avatar boyska

ref #17533 newlines in error message!

a message which is easier to read is more likely to give useful bug reports
parent efe2d4e1
......@@ -11,6 +11,8 @@ After=plymouth-quit.service
Requires=plymouth-quit-wait.service
After=plymouth-quit-wait.service
# for instructions on how to test this unit, see config/chroot_local-includes/usr/lib/gdm3/gdm-x-session.tails
[Service]
Type=oneshot
# We use VT5 that is clean of boot messages and does not get a getty started
......@@ -26,11 +28,11 @@ ExecStart=/bin/sh -c \
--kernel-command-line="plymouth.ignore-udev $(cat /proc/cmdline)"'
ExecStart=/bin/chvt 5
ExecStart=/bin/plymouth show-splash
ExecStart=/bin/sh -c \
'MAX_LENGTH=254 ; \
PREFIX="Error starting GDM with your graphics card: " ; \
SUFFIX=". Please take note of this error and visit https://tails.boum.org/gdm for troubleshooting." ; \
MAX_VIDEO_CARD_LENGTH=$(($MAX_LENGTH - $(echo -n "$PREFIX$SUFFIX" | wc -c))) ; \
VIDEO_CARD=$(lspci -d::0300 -nn | sed -E "s,.* VGA compatible controller \\[0300\\]:\s*,," | head -c "$MAX_VIDEO_CARD_LENGTH") ; \
/bin/plymouth display-message --text="$PREFIX$VIDEO_CARD$SUFFIX" \
'
ExecStart=/bin/bash -c \
"MAX_LENGTH=254 ; \
PREFIX=$'Error starting GDM with your graphics card:\n' ; \
SUFFIX=$'\nPlease take note of this error and visit https://tails.boum.org/gdm for troubleshooting.' ; \
MAX_VIDEO_CARD_LENGTH=\$((\$MAX_LENGTH - \$(echo -n \"\$PREFIX\$SUFFIX\" | wc -c))) ; \
VIDEO_CARD=\$(lspci -d::0300 -nn | sed -E 's,.* VGA compatible controller \\[0300\\]:\s*,,' | head -c \"\$MAX_VIDEO_CARD_LENGTH\") ; \
/bin/plymouth display-message --text=\"\$PREFIX\$VIDEO_CARD\$SUFFIX\" \
"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment