check_updates.sh: Check if another update is already running

This commit is contained in:
Alarig Le Lay 2021-03-08 11:38:25 +01:00
parent ad68d64e33
commit 17a84e9e6e
No known key found for this signature in database
GPG key ID: C865491BF197B54F

View file

@ -5,6 +5,12 @@ PATH="$PATH:/usr/sbin:/sbin"
TMP_FILE=$(mktemp)
MAIL=$(mktemp)
PORTAGE_RUNING=$(pgrep emerge)
if [ "${PORTAGE_RUNING}" ]; then
echo "Error: another emerge is already running, exiting"
exit 1
fi
PORTAGE_QUIET='1'
eix-sync 1>/dev/null 2>${TMP_FILE}