.profile: Remove systemd error log.

master
Pierre Neidhardt 2019-09-27 19:49:32 +02:00
parent bb7004541c
commit 71ef3b8f91
1 changed files with 1 additions and 10 deletions

View File

@ -91,18 +91,9 @@ gpg-connect-agent updatestartuptty /bye >/dev/null
## Linux specific
if [ "$(uname -o)" = "GNU/Linux" ] ; then
## Startup error log.
## dmesg
log_dmesg="$(dmesg | grep -i error)"
[ -n "$log_dmesg" ] && echo "$log_dmesg" > "$HOME/errors-dmesg.log" || rm "$HOME/errors-dmesg.log" 2>/dev/null
## systemd
if command -v systemctl >/dev/null 2>&1; then
count="$(systemctl show | awk -F= '$1=="NFailedUnits" {print $2; exit}')"
if [ $count -ne 0 ]; then
systemctl -l --failed > "$HOME/errors-systemd.log"
else
rm -f "$HOME/errors-systemd.log"
fi
fi
unset log_dmesg
## Set sound volume. (Useless when running Pulseaudio.)
# amixer 2>/dev/null | grep -q PCM && amixer set PCM 100%