forked from ungleich-public/cdist
__package_apt: add comment about package index update
This commit is contained in:
parent
1be5a9d316
commit
869a38676f
1 changed files with 3 additions and 0 deletions
|
@ -74,6 +74,9 @@ fi
|
||||||
|
|
||||||
case "$state_should" in
|
case "$state_should" in
|
||||||
present)
|
present)
|
||||||
|
# following is bit ugly, but important hack.
|
||||||
|
# due to how cdist config run works, there isn't
|
||||||
|
# currently better way to do it :(
|
||||||
cat << EOF
|
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
|
then echo apt-get update > /dev/null 2>&1 || true
|
||||||
|
|
Loading…
Reference in a new issue