From a6f10b1d97e54845c42dcf7bbaf79da7c7e2c2ec Mon Sep 17 00:00:00 2001 From: root Date: Fri, 12 Jan 2024 01:45:56 +0000 Subject: [PATCH] Added extra check to ensure apt-get is not in use --- bbb-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bbb-install.sh b/bbb-install.sh index f3e9c71..e1f73b2 100755 --- a/bbb-install.sh +++ b/bbb-install.sh @@ -561,7 +561,8 @@ need_pkg() { if ! dpkg -s "${@}" >/dev/null 2>&1; then LC_CTYPE=C.UTF-8 apt-get install -yq "${@}" fi - while fuser /var/lib/dpkg/lock >/dev/null 2>&1; do echo "Sleeping for 1 second because of dpkg lock"; sleep 1; done + while fuser /var/lib/dpkg/lock >/dev/null 2>&1; do echo "Sleeping for 1 second because of dpkg/lock is in use"; sleep 1; done + while lsof /var/lib/dpkg/lock-frontend >/dev/null 2>&1; do echo "Sleeping for 1 second because dpkg/lock-frontend in use"; sleep 1; done } need_ppa() {