Use release files to identify distro
Docker can run a different distro from the host. For example, Ubuntu host with CentOS docker image. The container uses the same kernel as the host tho. On a CentOS container under Ubuntu, `uname -a` will report it to be an Ubuntu kernel. Linux distros comes with configuration files under `/etc` that helps identify the family it is. An example of configuration files to help identify is on http://linuxmafia.com/faq/Admin/release-files.html
This commit is contained in:
		| @@ -1,5 +1,6 @@ | |||||||
| kickstart.os() { | kickstart.os() { | ||||||
|   uname -a | kickstart.stream.contains Ubuntu && echo "Ubuntu" |   [ -f /etc/lsb-release ] && echo "Ubuntu" | ||||||
|  |   [ -f /etc/redhat-release ] && echo "RHEL" | ||||||
|   uname -a | kickstart.stream.contains Darwin && echo "Mac" |   uname -a | kickstart.stream.contains Darwin && echo "Mac" | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user