nx_host_recover2.nx
buildroot/runtime/nx_host_recover2.nx
about
nx_host_recover2.nx -- run the PROVEN root recovery (reconcile2.sh) on the NAS via
our sovereign SSH, bringing the dead nx_hostctl supervisor (and thus sites.elf) back.
The script-FILE + setsid idiom survives the channel teardown where an inline launch
dies. The sudo password is streamed as the remote command's STDIN (sudo -S) so it
never appears in any cmdline. Reuses the vault preamble + ssh_put_file stdin-stream
from nx_aw_push. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_ssh_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 9 | const P_MAGIC_65536: i64 = 65536 |
| 10 | const P_MAGIC_1048576: i64 = 1048576 |
| 11 | const P_MAGIC_16384: i64 = 16384 |
| 12 | const P_MAGIC_1024: i64 = 1024 |
| 14 | const P_SECRET_OUT: *u8 = "/tmp/nxsecret.out" as *u8 |
| 15 | const P_VAULT_NV: *u8 = "/home/elderwesto/.nishi/secrets/nas.nv" as *u8 |
functions
| 17 | func p_run(path: *u8, a1: *u8, a2: *u8) -> i64 |
| 35 | func p_unlink(path: *u8) -> i64 { __syscall(263, AT_FDCWD, path, 0, 0, 0, 0) return 0 } called by 1: main |
| 36 | func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: main |
| 40 | func ssh_drain(st: *SshState) -> i64 |
| 48 | func ssh_put_file(st: *SshState, wcmd: *u8, wcmdlen: i64, data: *u8, datalen: i64) -> i64 |
| 88 | func main() -> i64 |