ISO source (NOT built, NOT published): boot text in the te-form (W1); the linked banner clears the screen and its scroll-back so the spent pairing code is gone (W7); test with a decoy
gates / gates (push) Failing after 14m52s
gates / gates (push) Failing after 14m52s
This commit is contained in:
1 parent
f90e22293a
commit
2fa5b8f3d8
3 files changed
+43
-2
No files matched your search
@@ -95,7 +95,10 @@ print_pairing_banner() {
|
|||||||
# the setup is running. The address is in the e-mail the customer already has.
|
# the setup is running. The address is in the e-mail the customer already has.
|
||||||
print_bound_banner() {
|
print_bound_banner() {
|
||||||
set_console_font
|
set_console_font
|
||||||
{ printf '\n================================================\n'
|
# W7 (rehearsal 2026-10-20): clear the screen AND its scroll-back first — the spent pairing code stayed readable
|
||||||
|
# above this banner. ESC[3J empties the Linux console's scroll-back, ESC[H ESC[2J the visible screen.
|
||||||
|
{ printf '\033[3J\033[H\033[2J'
|
||||||
|
printf '\n================================================\n'
|
||||||
printf ' Felhom — a doboz össze van kötve.\n\n'
|
printf ' Felhom — a doboz össze van kötve.\n\n'
|
||||||
printf ' A beállítás magától folytatódik, ez néhány percig tart.\n'
|
printf ' A beállítás magától folytatódik, ez néhány percig tart.\n'
|
||||||
printf ' A vezérlőpult címét az e-mailben kapott levél tartalmazza.\n\n'
|
printf ' A vezérlőpult címét az e-mailben kapott levél tartalmazza.\n\n'
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ set timeout=15
|
|||||||
set default=0
|
set default=0
|
||||||
|
|
||||||
menuentry 'Felhom telepítés / Install Felhom' --class felhom --class os {
|
menuentry 'Felhom telepítés / Install Felhom' --class felhom --class os {
|
||||||
echo 'A Felhom telepítése indul — válassza ki a lemezt a telepítőben...'
|
echo 'A Felhom telepítése indul — válaszd ki a lemezt a telepítőben...'
|
||||||
@@LINUX_GFX@@
|
@@LINUX_GFX@@
|
||||||
echo 'Rendszerbetöltő betöltése...'
|
echo 'Rendszerbetöltő betöltése...'
|
||||||
@@INITRD@@
|
@@INITRD@@
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
"""W7 (rehearsal 2026-10-20): the linked banner clears the console AND its scroll-back before it paints, so the spent
|
||||||
|
pairing code is no longer readable above it. Pure file read (runs on the BusyBox CI runner).
|
||||||
|
RED-PROOF: remove the ESC[3J printf from print_bound_banner → FAIL.
|
||||||
|
Run: python3 scripts/iso/test/test_bound_banner_clears.py"""
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
|
||||||
|
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
SCRIPT = os.path.join(os.path.dirname(HERE), "felhom-bootstrap.sh")
|
||||||
|
|
||||||
|
|
||||||
|
def banner_body(text):
|
||||||
|
m = re.search(r"^print_bound_banner\(\) \{\n(.*?)^\}", text, re.S | re.M)
|
||||||
|
return m.group(1) if m else ""
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
body = banner_body(open(SCRIPT, encoding="utf-8").read())
|
||||||
|
if not body:
|
||||||
|
print("FAIL: print_bound_banner not found")
|
||||||
|
return 1
|
||||||
|
first = re.search(r"printf\s+'([^']*)'", body)
|
||||||
|
if not first or "\\033[3J" not in first.group(1) or "\\033[2J" not in first.group(1):
|
||||||
|
print("FAIL: the first thing the linked banner prints must clear the screen and its scroll-back (\\033[3J ... \\033[2J)")
|
||||||
|
return 1
|
||||||
|
# control: the decoy without the clear is refused
|
||||||
|
if "\\033[3J" in banner_body("print_bound_banner() {\n printf 'x'\n}\n"):
|
||||||
|
print("FAIL: control")
|
||||||
|
return 1
|
||||||
|
print("OK: the linked banner clears the console and its scroll-back first")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(main())
|
||||||
Reference in new issue
Block a user