Преглед изворни кода

Merge pull request #43230 from sheabot/bugfix/check-config-os-release

fix(check-config.sh): Check for existence of /etc/os-release before sourcing
Tianon Gravi пре 3 година
родитељ
комит
12ba4848b2
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() {
 check_distro_userns() {
+	if [ ! -e /etc/os-release ]; then
+		return
+	fi
 	. /etc/os-release 2> /dev/null || /bin/true
 	. /etc/os-release 2> /dev/null || /bin/true
 	case "$ID" in
 	case "$ID" in
 		centos | rhel)
 		centos | rhel)