From 61b5525d5b794afd08b1c8b4eb378761dc29d864 Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Wed, 15 Apr 2015 23:03:49 -0700 Subject: [PATCH] Check if os-release exists first --- scripts/dockerimages/scripts/console.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dockerimages/scripts/console.sh b/scripts/dockerimages/scripts/console.sh index 7806839d..a944c9f7 100755 --- a/scripts/dockerimages/scripts/console.sh +++ b/scripts/dockerimages/scripts/console.sh @@ -76,7 +76,7 @@ if ! grep -q '^UseDNS no' /etc/ssh/sshd_config; then fi ID_TYPE="busybox" -if grep -q 'ID_LIKE=' /etc/os-release; then +if [ -e /etc/os-release ] && grep -q 'ID_LIKE=' /etc/os-release; then ID_TYPE=$(grep 'ID_LIKE=' /etc/os-release | cut -d'=' -f2) fi