__package_apt: pkgcache.bin may not exist

remotes/origin/beta
Ander Punnar 5 years ago
parent 08d5814e2c
commit b3bad9468d
  1. 2
      cdist/conf/type/__package_apt/gencode-remote

@ -75,7 +75,7 @@ fi
case "$state_should" in
present)
cat << EOF
if [ -f /var/cache/apt/pkgcache.bin ] && [ "\$( stat --format %Y /var/cache/apt/pkgcache.bin )" -lt "\$( date +%s -d '-1 day' )" ]
if [ ! -f /var/cache/apt/pkgcache.bin ] || [ "\$( stat --format %Y /var/cache/apt/pkgcache.bin )" -lt "\$( date +%s -d '-1 day' )" ]
then echo apt-get update > /dev/null 2>&1 || true
fi
EOF

Loading…
Cancel
Save