터치 패널 정리와 재부팅 원인 기록 보강
This commit is contained in:
1 parent
64510e8fe5
commit
11f27e5347
9 files changed
+488
-358
No files matched your search
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
src=/var/lib/systemd/pstore
|
||||
dst=/var/log/pstore
|
||||
|
||||
mkdir -p "$dst"
|
||||
chmod 0750 "$dst"
|
||||
|
||||
found=0
|
||||
if [ -d "$src" ]; then
|
||||
for source_file in "$src"/*; do
|
||||
[ -f "$source_file" ] || continue
|
||||
found=1
|
||||
base=$(basename "$source_file")
|
||||
digest=$(sha256sum "$source_file" | awk '{print substr($1, 1, 16)}')
|
||||
target="$dst/$digest-$base"
|
||||
if [ ! -e "$target" ]; then
|
||||
cp -a "$source_file" "$target"
|
||||
chmod 0640 "$target" 2>/dev/null || true
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "$found" -eq 1 ]; then
|
||||
logger -t control-pstore-collect "archived systemd pstore files in $dst"
|
||||
fi
|
||||
Reference in new issue
Block a user