Skip to content

Commit ea59233

Browse files
author
Jess Frazelle
committed
Merge pull request moby#16533 from justsml/LMDEv2
LMDE check added to `check_forked()` function - See moby#16498
2 parents e2a9eed + 9728269 commit ea59233

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

hack/install.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ echo_docker_as_nonroot() {
5353

5454
# Check if this is a forked Linux distro
5555
check_forked() {
56+
5657
# Check for lsb_release command existence, it usually exists in forked distros
5758
if command_exists lsb_release; then
5859
# Check if the `-u` option is supported
@@ -76,6 +77,20 @@ check_forked() {
7677
cat <<-EOF
7778
Upstream release is '$lsb_dist' version '$dist_version'.
7879
EOF
80+
else
81+
if [ -r /etc/debian_version ]; then
82+
# We're Debian and don't even know it!
83+
lsb_dist=debian
84+
dist_version="$(cat /etc/debian_version | sed 's/\/.*//' | sed 's/\..*//')"
85+
case "$dist_version" in
86+
8)
87+
dist_version="jessie"
88+
;;
89+
7)
90+
dist_version="wheezy"
91+
;;
92+
esac
93+
fi
7994
fi
8095
fi
8196
}

0 commit comments

Comments
 (0)