Skip to content

Commit

Permalink
Update install.sh: 2 fixes
Browse files Browse the repository at this point in the history
1. fuser fails if the file isn't locked.

2. "return 1" after 5 times.
  • Loading branch information
EricClaeys authored Aug 10, 2024
1 parent 3769ea5 commit 1b2e106
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -762,13 +762,13 @@ run_aptGet()
{
local NUM_FAILS=0

while ! fuser --silent "/var/lib/dpkg/lock-frontend" ;
while fuser --silent "/var/lib/dpkg/lock-frontend" ;
do
(( NUM_FAILS++ ))
if [[ ${NUM_FAILS} -eq 5 ]]; then
echo "apt-get is locked. Tried 5 times." >&2
echo "Wait a while and try the Allsky installation again." >&2
break
return 1
fi
sleep 3
done
Expand Down

0 comments on commit 1b2e106

Please sign in to comment.