mirror of
https://github.com/actions/runner-images.git
synced 2025-12-17 23:28:57 +00:00
use fuser
This commit is contained in:
@@ -8,17 +8,18 @@ for tool in apt apt-get apt-fast;do
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
i=1
|
i=1
|
||||||
while [ \$i -le 10 ];do
|
while [ \$i -le 30 ];do
|
||||||
$real_tool "\$@"
|
fuser /var/lib/dpkg/lock >/dev/null 2>&1
|
||||||
result=\$?
|
result=\$?
|
||||||
if [ \$result -eq 0 ];then
|
if [ \$result -eq 0 ];then
|
||||||
break
|
sleep 1
|
||||||
else
|
echo "/var/lib/dpkg/locked... retry \$i"
|
||||||
sleep 5
|
|
||||||
echo "...retry \$i"
|
|
||||||
i=\$((i + 1))
|
i=\$((i + 1))
|
||||||
|
else
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
$real_tool "\$@"
|
||||||
EOT
|
EOT
|
||||||
chmod +x $prefix/$tool
|
chmod +x $prefix/$tool
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user