Skip to content
Snippets Groups Projects
Verified Commit b697b00a authored by Nicolas KAROLAK's avatar Nicolas KAROLAK
Browse files

fix exit on error check

parent 12e4c8da
No related branches found
No related tags found
No related merge requests found
...@@ -11,8 +11,9 @@ echo "Testing apt-get install." ...@@ -11,8 +11,9 @@ echo "Testing apt-get install."
lock_timeout=120 lock_timeout=120
lock_counter=0 lock_counter=0
tput sc tput sc
set +e
while fuser /var/lib/dpkg/lock >/dev/null 2>&1 ; do while fuser /var/lib/dpkg/lock >/dev/null 2>&1 ; do
sleep 1 && echo $lock_counter && (( lock_counter++ )) sleep 1 && echo -n $lock_counter && (( lock_counter++ ))
tput rc tput rc
if (( $lock_counter > $lock_timeout )); then if (( $lock_counter > $lock_timeout )); then
echo "APT is reported as locked for more than $lock_timeout seconds now..." echo "APT is reported as locked for more than $lock_timeout seconds now..."
...@@ -20,6 +21,7 @@ while fuser /var/lib/dpkg/lock >/dev/null 2>&1 ; do ...@@ -20,6 +21,7 @@ while fuser /var/lib/dpkg/lock >/dev/null 2>&1 ; do
exit 1 exit 1
fi fi
done done
set -e
echo "Clean repository." echo "Clean repository."
apt-get clean apt-get clean
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment