浏览代码

fix(check-config.sh): Check for existence of /etc/os-release before sourcing

Signed-off-by: Ryan Shea <sheabot03@gmail.com>
Ryan Shea 3 年之前
父节点
当前提交
2deec80dba
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      contrib/check-config.sh

+ 3 - 0
contrib/check-config.sh

@@ -121,6 +121,9 @@ check_device() {
 }
 
 check_distro_userns() {
+	if [ ! -e /etc/os-release ]; then
+		return
+	fi
 	. /etc/os-release 2> /dev/null || /bin/true
 	case "$ID" in
 		centos | rhel)