From 4fd77f57faead42a8d8accc3a9d59e80f92e957d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Tue, 31 Dec 2024 16:42:08 +0100 Subject: [PATCH] Remove now unused function test_dpkg_lock() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- automated install/basic-install.sh | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index b1608c70..c7d479d0 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -388,28 +388,6 @@ os_check() { fi } -# This function waits for dpkg to unlock, which signals that the previous apt-get command has finished. -test_dpkg_lock() { - i=0 - printf " %b Waiting for package manager to finish (up to 30 seconds)\\n" "${INFO}" - # fuser is a program to show which processes use the named files, sockets, or filesystems - # So while the lock is held, - while fuser /var/lib/dpkg/lock >/dev/null 2>&1; do - # we wait half a second, - sleep 0.5 - # increase the iterator, - ((i = i + 1)) - # exit if waiting for more then 30 seconds - if [[ $i -gt 60 ]]; then - printf " %b %bError: Could not verify package manager finished and released lock. %b\\n" "${CROSS}" "${COL_LIGHT_RED}" "${COL_NC}" - printf " Attempt to install packages manually and retry.\\n" - exit 1 - fi - done - # and then report success once dpkg is unlocked. - return 0 -} - # Compatibility package_manager_detect() {