Skip to content

Commit 6fe6d51

Browse files
committed
Supply defaults in case of unconfigured apt
1 parent 690edbe commit 6fe6d51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/update_had_no_effect.sh.epp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
Integer $timeout = 30,
44
Integer $tries = 1,
55
| -%>
6-
eval "$(apt-config shell DIR Dir::Cache)"
6+
eval "$(apt-config shell DIR Dir::Cache || echo "DIR='var/cache/apt'")"
77
cd "/$DIR" || exit 0
88
OLD="$(mktemp -p "/$DIR")"
9-
eval "$(apt-config shell CUR Dir::Cache::pkgcache)"
9+
eval "$(apt-config shell CUR Dir::Cache::pkgcache || echo "CUR='pkgcache.bin'")"
1010
ln -f "$CUR" "$OLD"
1111
TRIES=<%= $tries %>
1212
while true; do

0 commit comments

Comments
 (0)