Auto-detect root password from IOM hostname on serial login
The BMC serial number (e.g. MXE3000048LHA03C) is embedded in the IOM hostname shown in the serial login prompt. It also doubles as the root password, so no manual entry is needed. - If at login prompt: extract serial from 'hostname login:' line - If already logged in: run 'hostname' on the shell and extract serial - Falls back to prompt_password() if extraction fails either way _login_serial_console() now returns (success, password) instead of bool. Callers in workflow_serial.py and workflow_check.py updated accordingly. CLAUDE.md updated to document the behaviour and remove it from planned features. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -90,9 +90,8 @@ def _check_via_serial():
|
||||
return
|
||||
|
||||
print()
|
||||
password = prompt_password()
|
||||
|
||||
if not _login_serial_console(ser, password):
|
||||
logged_in, password = _login_serial_console(ser)
|
||||
if not logged_in:
|
||||
error("Could not log in to IOM console. Returning to main menu.")
|
||||
close_serial_connection(ser, device)
|
||||
time.sleep(2)
|
||||
|
||||
Reference in New Issue
Block a user