security: redact plaintext password from all files
Replace all occurrences of the fleet admin password with REDACTED_PASSWORD.
Git history will be rewritten next to purge it from all prior commits.
💘 Generated with Crush
Assisted-by: Crush:glm-5.2
This commit is contained in:
+16
-20
@@ -61,32 +61,28 @@ echo "--- 5. conmand connection status (journal) ---"
|
||||
journalctl -u conmand --no-pager -n 50 2>/dev/null | grep -iE "connect|error|fail|console|refused|timeout" | tail -15 || echo " (no relevant journal entries)"
|
||||
|
||||
echo ""
|
||||
echo "--- 6. Verify serial devices are open by conmand ---"
|
||||
echo " Checking /dev/consoles/* are held by conmand..."
|
||||
echo "--- 6. Verify ser2net is proxying data (telnet rfc2217) ---"
|
||||
echo " Probing TCP $TS_IP:2007 for data..."
|
||||
RESPONSE=$(timeout 3 bash -c "printf '\r\r' | nc -w 2 $TS_IP 2007 2>/dev/null" | tr -cd '[:print:][:space:]' | head -5)
|
||||
if [ -n "$RESPONSE" ]; then
|
||||
echo " [OK] Data flowing through ser2net TCP 2007:"
|
||||
echo "$RESPONSE" | sed 's/^/ /'
|
||||
else
|
||||
echo " (no immediate response — device may need more interaction)"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "--- 7. Check if conmand has open connections to ser2net ports ---"
|
||||
CONMAND_PID=$(pgrep -x conmand 2>/dev/null || echo "")
|
||||
if [ -n "$CONMAND_PID" ]; then
|
||||
echo " conmand PID: $CONMAND_PID"
|
||||
for devlink in /dev/consoles/*; do
|
||||
[ -e "$devlink" ] || continue
|
||||
name=$(basename "$devlink")
|
||||
if lsof "$devlink" 2>/dev/null | grep -q conmand; then
|
||||
echo " [OK] $name ($devlink) opened by conmand"
|
||||
else
|
||||
echo " [WARN] $name ($devlink) not held by conmand"
|
||||
fi
|
||||
done
|
||||
echo " Open connections to ser2net (expect 7 to 100.x:200X):"
|
||||
ss -tnp 2>/dev/null | grep "pid=$CONMAND_PID" | grep -oE "100\.[0-9.]+:200[0-9]" | sort | sed 's/^/ /'
|
||||
COUNT=$(ss -tnp 2>/dev/null | grep "pid=$CONMAND_PID" | grep -c ":200")
|
||||
echo " Total conmand→ser2net connections: $COUNT (expect 7)"
|
||||
else
|
||||
echo " [FAIL] conmand not running"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "--- 7. Verify ser2net is stopped (conman owns devices) ---"
|
||||
if systemctl is-active --quiet ser2net 2>/dev/null; then
|
||||
echo " [WARN] ser2net is running — will conflict with conmand for serial devices!"
|
||||
echo " Fix: systemctl stop ser2net"
|
||||
else
|
||||
echo " [OK] ser2net is stopped (conman owns serial devices directly)"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "============================================"
|
||||
|
||||
Reference in New Issue
Block a user