deploy.sh: post-deploy check, --post-check, host-aware verify list
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KqhjP7nud5gdBg25zCiRk9
This commit is contained in:
@@ -169,4 +169,18 @@ else
|
||||
bad "--redact lost keys or diff markers"; echo "$red" | sed 's/^/ /'
|
||||
fi
|
||||
|
||||
# 11. --post-check: no root, warns on this (non-router) machine, exits 1; host-aware; no stale text
|
||||
pc=$(POSTCHECK_WAIT=0 ./deploy.sh --post-check hosts/van.conf 2>&1) && rc=0 || rc=$?
|
||||
if [ "$rc" = 1 ] && echo "$pc" | grep -q '^== post-deploy check ==$' && echo "$pc" | grep -q -- '-> post-deploy:'; then
|
||||
ok "--post-check hosts/van.conf: heading, warnings, exit 1"
|
||||
else
|
||||
bad "--post-check hosts/van.conf (exit $rc)"; echo "$pc" | sed 's/^/ /'
|
||||
fi
|
||||
tmpconf=$(mktemp); trap 'rm -f "$empty" "$tmpconf"' EXIT
|
||||
grep -q '^ENABLE_NVME_WATCH=0' hosts/wan.conf && cp hosts/wan.conf "$tmpconf"
|
||||
pc=$(POSTCHECK_WAIT=0 ./deploy.sh --post-check "$tmpconf" 2>&1) || true
|
||||
if echo "$pc" | grep -q 'van-nvme-watch'; then bad "--post-check mentions van-nvme-watch with ENABLE_NVME_WATCH=0"
|
||||
else ok "--post-check skips van-nvme-watch when ENABLE_NVME_WATCH=0"; fi
|
||||
if grep -q 'USB hub' deploy.sh; then bad "stale 'USB hub' text remains in deploy.sh"; else ok "no stale 'USB hub' text in deploy.sh"; fi
|
||||
|
||||
exit "$fail"
|
||||
|
||||
Reference in New Issue
Block a user