mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
Merge pull request #1331 from kernelkit/support-test-update
Support test update
This commit is contained in:
+2
-1
@@ -24,7 +24,8 @@ All notable changes to the project are documented in this file.
|
||||
|
||||
### Fixes
|
||||
|
||||
N/A
|
||||
- Fix #1314: Raspberry Pi 4B with 1 or 8 GiB RAM does not boot. This was due
|
||||
newer EEPROM firmware in newer boards require a newer rpi-firmware package
|
||||
|
||||
[v25.11.0][] - 2025-12-02
|
||||
-------------------------
|
||||
|
||||
+6
-45
@@ -1,55 +1,16 @@
|
||||
#!/bin/sh
|
||||
# Support utilities for troubleshooting Infix systems
|
||||
|
||||
# Program name for usage messages (supports being renamed by users)
|
||||
prognm=$(basename "$0")
|
||||
|
||||
#
|
||||
# The collect command gathers system information and outputs a tarball.
|
||||
# Data is collected to /var/lib/support (or $HOME as fallback) and then
|
||||
# streamed to stdout. The temporary directory is cleaned up automatically.
|
||||
#
|
||||
# The following text is primarily intended for users of older Infix
|
||||
# systems that do not yet have this script in the root fileystems.
|
||||
#
|
||||
# 1. Copy this script to the target device's home directory:
|
||||
#
|
||||
# scp support user@device:
|
||||
#
|
||||
# 2. SSH to the device and make it executable:
|
||||
#
|
||||
# ssh user@device chmod +x support
|
||||
#
|
||||
# 3. Run the script from your home directory:
|
||||
#
|
||||
# ./support collect > support-data.tar.gz
|
||||
#
|
||||
# Or directly via SSH from your workstation:
|
||||
#
|
||||
# ssh user@device './support collect' > support-data.tar.gz
|
||||
#
|
||||
# Optionally, the output can be encrypted with GPG using a password for
|
||||
# secure transmission to support personnel, see below.
|
||||
#
|
||||
# Examples:
|
||||
# ./support collect > support-data.tar.gz
|
||||
# ./support collect -s 5 > support-data.tar.gz
|
||||
# ./support collect -p > support-data.tar.gz.gpg
|
||||
# ./support collect -p mypass > support-data.tar.gz.gpg
|
||||
#
|
||||
# ssh user@device ./support collect > support-data.tar.gz
|
||||
# ssh user@device ./support collect -p mypass > support-data.tar.gz.gpg
|
||||
#
|
||||
# Note, interactive password prompt (-p without argument) may echo characters
|
||||
# over SSH due to local terminal echo. Use -p PASSWORD for remote execution,
|
||||
# or pipe the password: echo "password" | ssh user@device ./support collect -p
|
||||
# meaning you can even: echo "$SECRET_VARIABLE" | ... which in some cases can
|
||||
# come in handy.
|
||||
#
|
||||
# TODO:
|
||||
# Add more commands, e.g., verify (run health checks), upload <file>,
|
||||
# test <network|disk|routing>, backup, watch (dashboard view), diff
|
||||
# See: 'support help' for more information.
|
||||
#
|
||||
# <<< THIS SCRIPT REQUIRES SUDO TO COLLECT RELEVANT LOGS >>>
|
||||
|
||||
# Program name for usage messages (supports being renamed by users)
|
||||
prognm=$(basename "$0")
|
||||
|
||||
cmd_collect()
|
||||
{
|
||||
@@ -564,7 +525,7 @@ usage()
|
||||
echo " sudo $prognm collect -p > support-data.tar.gz.gpg"
|
||||
echo " sudo $prognm collect --password mypass > support-data.tar.gz.gpg"
|
||||
echo " sudo $prognm --work-dir /tmp/ram collect > support-data.tar.gz"
|
||||
echo " ssh user@device 'sudo $prognm collect' > support-data.tar.gz"
|
||||
echo " ssh admin@device 'sudo $prognm collect' > support-data.tar.gz"
|
||||
echo " $prognm -u collect > support-data.tar.gz (degraded)"
|
||||
echo " sudo $prognm clean --dry-run"
|
||||
echo " sudo $prognm clean --days 30"
|
||||
|
||||
@@ -39,7 +39,7 @@ with infamy.Test() as test:
|
||||
# Note: timeout is generous to handle systems with many network ports
|
||||
# (ethtool collection scales with number of interfaces)
|
||||
with open(output_file, 'wb') as f:
|
||||
result = tgtssh.run("support --work-dir /tmp collect --log-sec 2",
|
||||
result = tgtssh.run("sudo support --work-dir /tmp collect --log-sec 2",
|
||||
stdout=f,
|
||||
stderr=subprocess.PIPE,
|
||||
timeout=120)
|
||||
@@ -117,7 +117,7 @@ with infamy.Test() as test:
|
||||
|
||||
# Run support collect with encryption
|
||||
with open(encrypted_file, 'wb') as f:
|
||||
result = tgtssh.run(f"support --work-dir /tmp collect --log-sec 2 --password {test_password}",
|
||||
result = tgtssh.run(f"sudo support --work-dir /tmp collect --log-sec 2 --password {test_password}",
|
||||
stdout=f,
|
||||
stderr=subprocess.PIPE,
|
||||
timeout=120)
|
||||
|
||||
Reference in New Issue
Block a user