Merge branch 'missing-apt-list' into 'master'
Missing apt list See merge request ungleich-public/cdist!1028
This commit is contained in:
commit
6ac72fb649
|
@ -34,7 +34,8 @@ apt_opts="-o Acquire::AllowReleaseInfoChange::Suite=true -o Acquire::AllowReleas
|
|||
# run 'apt-get update' if anything in /etc/apt is newer then /var/lib/apt/lists
|
||||
# it will be run a second time on error as a redundancy messure to success
|
||||
cat << DONE
|
||||
if find /etc/apt -mindepth 1 -cnewer /var/lib/apt/lists | grep . > /dev/null; then
|
||||
newer_sources=\$(find /etc/apt -mindepth 1 -cnewer /var/lib/apt/lists)
|
||||
if [ ! -d /var/lib/apt/lists ] || [ -n "${newer_sources}" ]; then
|
||||
apt-get $apt_opts update || apt-get $apt_opts update
|
||||
fi
|
||||
DONE
|
||||
|
|
Loading…
Reference in New Issue