aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoïc Guégan <loic.guegan@mailbox.org>2024-07-04 14:56:18 +0200
committerLoïc Guégan <loic.guegan@mailbox.org>2024-07-04 14:56:18 +0200
commit33de6a5a9e3f547700213e2a48422516dcb81049 (patch)
treebf85ebe2528fac9f3c316f87d72f9b7af168e96b
parent3a3e71450a21bd1374e357d98fe840393768d4d1 (diff)
Minor changes
-rw-r--r--README.md11
-rwxr-xr-xsysdump.sh7
2 files changed, 12 insertions, 6 deletions
diff --git a/README.md b/README.md
index 66c59f1..9ede543 100644
--- a/README.md
+++ b/README.md
@@ -21,10 +21,15 @@ Explore specific entries of a dump:
If `sysdump.sh` is not run as root, these commands will not be executed.
# Useful entries
+Important note: Depending on the system, some entries may not be available.
+
+| Entry | Description |
+|-------------|-----------------------------|
+| compgen | List all available commands |
+| boot_folder | Recursive listing of /boot/ |
+| root_folder | Content of / |
+| home_folder | Content of $HOME |
-| Entry | Description |
-|---------|-----------------------------|
-| compgen | List all available commands |
diff --git a/sysdump.sh b/sysdump.sh
index 8e2f034..f9762ea 100755
--- a/sysdump.sh
+++ b/sysdump.sh
@@ -24,7 +24,7 @@ dump() {
[ -z "$2" ] && return
entry=$1
shift
- value=$($@|base64 -w 0)
+ value=$($@ 2>&1|base64 -w 0)
[ "$USE_COMMA" -eq 1 ] && echo "\"${entry}\": \"${value}\","
[ "$USE_COMMA" -eq 0 ] && echo "\"${entry}\": \"${value}\""
}
@@ -76,7 +76,7 @@ dump "/etc/sysctl.conf" safecat /etc/sysctl.conf
dump "/etc/apt/sources.list" safecat /etc/apt/sources.list
dump "/etc/hosts" safecat /etc/hosts
dump "/etc/bash.bashrc" safecat /etc/bash.bashrc
-dump "timezone" safecat /etc/timezone
+dump "/etc/timezone" safecat /etc/timezone
dump "/boot/config-$(uname -r)" safecat /boot/config-$(uname -r)
# safecatroot
dump "/etc/shadow" safecatroot /etc/shadow
@@ -91,7 +91,8 @@ dump "locale" safecmd locale
dump "systemctl" safecmd systemctl --no-pager
dump "free" safecmd free -h
dump "df" safecmd df -h
-dump "boot_folder" safecmd ls -al /boot/
+dump "boot_folder" safecmd ls -R /boot/
+dump "home_folder" safecmd ls -al ${HOME}
dump "uid" safecmd id -u
dump "gid" safecmd id -g
dump "gids" safecmd id -G