#!/bin/sh
# bashclub-base: Hinweis nach einem Rückfall des Probe-Boots (bashclub-be), bis er
# quittiert ist; --issue: Fassung für /etc/issue.d (agetty), schreibt bashclub-be
[ -s /var/lib/bashclub-be/probe-failed ] || exit 0
BRAND_NAME='bashclub OS'
BRAND_ACCENT='38;5;208' BRAND_ERROR='1;31' BRAND_SSH_HINT=yes
BRAND_LOGO_1='╭───────╮' BRAND_LOGO_2='│@R@  @A@>@R@_   @A@│' BRAND_LOGO_3='╰───────╯'
[ -r /usr/share/bashclub/branding.sh ] && . /usr/share/bashclub/branding.sh
a=$(printf '\033[%sm' "$BRAND_ACCENT") e=$(printf '\033[%sm' "$BRAND_ERROR") r=$(printf '\033[0m')
if [ "${1:-}" = --issue ]; then
	cat <<'EOF'
\e{red}\e{bold}  ! Boot after the update failed, the previous state is running.\e{reset}
    bashclub-be status

EOF
else
printf '   %s┌%s┐%s\n' "$e" '── Fallback ──────────────────────────────────────────────────' "$r"
printf '   %s│%s %s %s│%s\n' "$e" "$r" 'Boot after the update failed, the previous state is running.' "$e" "$r"
printf '   %s│%s %s %s│%s\n' "$e" "$r" 'Details:  bashclub-be status                                ' "$e" "$r"
printf '   %s│%s %s %s│%s\n' "$e" "$r" 'Then acknowledge:  sudo bashclub-be ack                     ' "$e" "$r"
printf '   %s└%s┘%s\n\n' "$e" '──────────────────────────────────────────────────────────────' "$r"
fi
