Scripts to verify the integrity of a gentoo install
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
624 B

#!/bin/sh
# Scan the filesystem for orphaned/unused files (super slow because portage-utils doesn't accept stdin)
# Note that this files a *lot* of pre/postinstall files that should(!) exist
tmp1="$(mktemp)"
tmp2="$(mktemp)"
trap "rm -f '$tmp1' '$tmp2'" EXIT
cat orphans_ignore.txt orphans_ignore/*.txt | grep '^/' | sort > "$tmp1"
find /bin /sbin /lib /lib64 /usr > "$tmp2"
grep -xvf "$tmp1" "$tmp2" | xargs -P$(nproc) -d '\n' qfile -o | tee orphans.txt
grep -Fxvf "$tmp2" "$tmp1" | grep -v '\*' | tee orphans_missing.txt
#find /etc | \
#grep -xvf "$tmp" | \
#xargs -P$(nproc) -d '\n' qfile -o | tee orphans.txt