Merge branch 'master' into feature_init_process
Conflicts: doc/changelog doc/dev/todo/niconext doc/man/cdist-reference.text.sh lib/cdist/core/explorer.py doc/man/cdist-reference.text.sh documents better reachability of variables - also suitable for master? Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
commit
2b380b7dc1
55 changed files with 910 additions and 349 deletions
|
|
@ -18,13 +18,14 @@
|
|||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#
|
||||
# All os variables are lower case
|
||||
#
|
||||
# All os variables are lower case. Keep this file in alphabetical
|
||||
# order by os variable except in cases where order otherwise matters,
|
||||
# in which case keep the primary os and its derivatives together in
|
||||
# a block (see Debian and Redhat examples below).
|
||||
#
|
||||
|
||||
# Ubuntu is also Debian, thus return if Ubuntu was found
|
||||
if grep -q ^DISTRIB_ID=Ubuntu /etc/lsb-release 2>/dev/null; then
|
||||
echo ubuntu
|
||||
if grep -q ^Amazon /etc/system-release 2>/dev/null; then
|
||||
echo amazon
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
|
@ -33,45 +34,52 @@ if [ -f /etc/arch-release ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f /etc/cdist-preos ]; then
|
||||
echo cdist-preos
|
||||
exit 0
|
||||
fi
|
||||
|
||||
### Debian and derivatives
|
||||
if grep -q ^DISTRIB_ID=Ubuntu /etc/lsb-release 2>/dev/null; then
|
||||
echo ubuntu
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f /etc/debian_version ]; then
|
||||
echo debian
|
||||
exit 0
|
||||
fi
|
||||
###
|
||||
|
||||
if [ -f /etc/gentoo-release ]; then
|
||||
echo gentoo
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Fedora is also Redhat, thus return before redhat!
|
||||
if grep -q ^Fedora /etc/redhat-release 2>/dev/null; then
|
||||
echo fedora
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# CentOS is also based on Redhat, thus return before redhat!
|
||||
if grep -q ^CentOS /etc/redhat-release 2>/dev/null; then
|
||||
echo centos
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f /etc/redhat-release ]; then
|
||||
echo redhat
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f /etc/SuSE-release ]; then
|
||||
echo suse
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f /etc/owl-release ]; then
|
||||
echo owl
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f /etc/cdist-preos ]; then
|
||||
echo cdist-preos
|
||||
### Redhat and derivatives
|
||||
if grep -q ^CentOS /etc/redhat-release 2>/dev/null; then
|
||||
echo centos
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if grep -q ^Fedora /etc/redhat-release 2>/dev/null; then
|
||||
echo fedora
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f /etc/redhat-release ]; then
|
||||
echo redhat
|
||||
exit 0
|
||||
fi
|
||||
###
|
||||
|
||||
if [ -f /etc/SuSE-release ]; then
|
||||
echo suse
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@
|
|||
#
|
||||
|
||||
case "$($__explorer/os)" in
|
||||
amazon)
|
||||
cat /etc/system-release
|
||||
;;
|
||||
archlinux)
|
||||
# empty, but well...
|
||||
cat /etc/arch-release
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue