Commit e1219c4a authored by Vitaly Lipatov's avatar Vitaly Lipatov

check_updated_repo: use $SUDO for check if updated

parent d9aa9f4d
......@@ -36,13 +36,13 @@ __is_repo_info_uptodate()
{
case $PMTYPE in
apt-*)
if [ -r /var/lib/apt/lists ] ; then
if $SUDO [ -r /var/lib/apt/lists ] ; then
local LOCKFILE=/var/lib/apt/lists/lock
# FIXME: only if root permissions, now skip for user
test -r $LOCKFILE || return
$SUDO test -r $LOCKFILE || return
# if repo older than 1 day, return false
# find print string if file is obsoleted
test -z "$(find $LOCKFILE -mtime +1)" || return
test -z "$($SUDO find $LOCKFILE -mtime +1)" || return
fi
;;
*)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment