Checkpoint: netboot debug state before model swap
This commit is contained in:
@@ -19,6 +19,24 @@ fail() { log "FATAL: $*"; sleep 3600; reboot -f; }
|
||||
report() { wget -q -O /dev/null "$HTTP/events/$1" 2>/dev/null; }
|
||||
|
||||
log "planck installer starting"
|
||||
|
||||
# test mode (kexec): verify kernel+initramfs+network without touching disks
|
||||
if grep -q planck_test /proc/cmdline 2>/dev/null; then
|
||||
SERIAL=$(awk '/Serial/ {print $3}' /proc/cpuinfo)
|
||||
HOST=$(awk -v s="$SERIAL" 'tolower($1)==tolower(s) {print $2}' /conf/hostmap)
|
||||
log "TEST MODE on $HOST"
|
||||
report "$HOST-test-start"
|
||||
ifconfig eth0 up
|
||||
udhcpc -i eth0 -n -q -s /etc/udhcpc.script >/dev/null 2>&1 && log "dhcp ok" || log "dhcp FAIL"
|
||||
IP=$(ip -4 -o addr show eth0 | awk '{print $4}' | cut -d/ -f1)
|
||||
log "ip $IP"
|
||||
report "$HOST-test-dhcp-$IP"
|
||||
wget -q -O /tmp/test.bin "$HTTP/planck-http-server.py" && log "http get ok" || log "http FAIL"
|
||||
report "$HOST-test-http"
|
||||
sleep 5
|
||||
poweroff -f
|
||||
fi
|
||||
|
||||
report "started"
|
||||
|
||||
# --- identify this node -------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user