0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.145.40.234


Current Path : /proc/self/root/usr/lib/update-notifier/
Upload File :
Current File : //proc/self/root/usr/lib/update-notifier/package-system-locked

#!/bin/sh
# check if package system is locked
# return 0 if unlocked, 2 if locked, 1 on error
set -e

for f in /var/lib/dpkg/lock /var/cache/apt/archives/lock \
    /var/lib/apt/lists/lock /run/unattended-upgrades.lock; do
    [ -e $f ] || continue

    # fuser succeeds if there is at least one user
    if fuser $f; then
        exit 2
    fi
done

exit 0