[scripts] mhwd-live

- try to find out why pacman.db is locked in some cases
- added more debug info
- longer timeout before removing lock.db
This commit is contained in:
Philip 2015-06-06 09:29:30 +02:00
parent 4d5217184c
commit 377a6fd67a

View file

@ -9,12 +9,15 @@ VIDEO="$(kernel_cmdline xdriver no)"
seconds="0"
while [ -e "/var/lib/pacman/db.lck" ];
do
echo 'Pacman is not ready yet. Will try again in 5 seconds.' >> /var/log/livecd.log
seconds=$(($seconds + 5))
sleep 5
if [[ "$seconds" == "15" ]]; then
# remove database lock after 15s
echo 'Pacman is not ready yet. Will try again in 10 seconds.' >> /var/log/livecd.log
ps -ef >> /var/log/livecd.log
echo '----' >> /var/log/livecd.log
seconds=$(($seconds + 10))
sleep 10
if [[ "$seconds" == "120" ]]; then
# remove database lock after 120s
# this might be related to https://github.com/manjaro/pamac/issues/25
# https://github.com/manjaro/manjaro-tools/issues/101
rm /var/lib/pacman/db.lck
fi
done