From 0595d723ab1ab695052c2fe765602a525d72cbdb Mon Sep 17 00:00:00 2001 From: Olaf Meeuwissen Date: Mon, 23 Oct 2017 20:40:32 +0900 Subject: [PATCH] Protect against inconsistent use of / separators in APT paths As a matter of fact, our own fallback would not even have worked :-( The `readlink` invocations clean up duplicated and trailing slashes. --- scripts-slim/tweak-apt-config | 4 ++-- scripts/docker-apt-clean | 6 ++++-- scripts/remove-apt-lists | 4 +++- scripts/tweak-apt-config | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/scripts-slim/tweak-apt-config b/scripts-slim/tweak-apt-config index d69d544..0a9fef9 100644 --- a/scripts-slim/tweak-apt-config +++ b/scripts-slim/tweak-apt-config @@ -5,14 +5,14 @@ # License: GPL-3.0+ DIR=/ -ETC=etc/apt +ETC=etc/apt/ PARTS=apt.conf.d eval $(apt-config shell DIR Dir) eval $(apt-config shell ETC Dir::Etc) eval $(apt-config shell PARTS Dir::Etc::Parts) -cfg=$DIR$ETC$PARTS +cfg=$(readlink -f /$DIR/$ETC/$PARTS) cat > $cfg/docker-recommends < $cfg/docker-clean <