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
1 changed files with 6 additions and 0 deletions

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}