diff --git a/cdist/conf/explorer/os b/cdist/conf/explorer/os index de1d29c3..550192d4 100755 --- a/cdist/conf/explorer/os +++ b/cdist/conf/explorer/os @@ -72,6 +72,11 @@ if [ -f /etc/owl-release ]; then fi ### Redhat and derivatives +if grep -q ^Scientific /etc/redhat-release 2>/dev/null; then + echo scientific + exit 0 +fi + if grep -q ^CentOS /etc/redhat-release 2>/dev/null; then echo centos exit 0 diff --git a/cdist/conf/explorer/os_version b/cdist/conf/explorer/os_version index 6c7becdc..58f750b0 100755 --- a/cdist/conf/explorer/os_version +++ b/cdist/conf/explorer/os_version @@ -54,7 +54,7 @@ case "$($__explorer/os)" in owl) cat /etc/owl-release ;; - redhat|centos|mitel) + redhat|centos|mitel|scientific) cat /etc/redhat-release ;; slackware) diff --git a/cdist/conf/type/__consul/manifest b/cdist/conf/type/__consul/manifest index 0187d959..b16c5749 100755 --- a/cdist/conf/type/__consul/manifest +++ b/cdist/conf/type/__consul/manifest @@ -23,7 +23,7 @@ os=$(cat "$__global/explorer/os") case "$os" in - centos|redhat|ubuntu|debian|archlinux|gentoo) + scientific|centos|redhat|ubuntu|debian|archlinux|gentoo) # any linux should work : ;; diff --git a/cdist/conf/type/__consul_agent/manifest b/cdist/conf/type/__consul_agent/manifest index b4d1d75c..7f180494 100755 --- a/cdist/conf/type/__consul_agent/manifest +++ b/cdist/conf/type/__consul_agent/manifest @@ -23,7 +23,7 @@ os=$(cat "$__global/explorer/os") case "$os" in - centos|debian|redhat|ubuntu) + scientific|centos|debian|redhat|ubuntu) # whitelist safeguard : ;; diff --git a/cdist/conf/type/__consul_template/manifest b/cdist/conf/type/__consul_template/manifest index cedcb413..4448cc71 100755 --- a/cdist/conf/type/__consul_template/manifest +++ b/cdist/conf/type/__consul_template/manifest @@ -22,7 +22,7 @@ os=$(cat "$__global/explorer/os") case "$os" in - centos|redhat) + scientific|centos|redhat) # whitelist safeguard service_onchange='service consul-template status >/dev/null && service consul-template reload || true' \ ;; diff --git a/cdist/conf/type/__hostname/gencode-remote b/cdist/conf/type/__hostname/gencode-remote index 9fac7bf4..c1808de0 100755 --- a/cdist/conf/type/__hostname/gencode-remote +++ b/cdist/conf/type/__hostname/gencode-remote @@ -40,7 +40,7 @@ case "$os" in exit 0 fi ;; - centos) + scientific|centos) if [ "$name_sysconfig" = "$name_should" -a "$name_running" = "$name_should" ]; then exit 0 fi diff --git a/cdist/conf/type/__hostname/manifest b/cdist/conf/type/__hostname/manifest index 76f962e0..842075e0 100755 --- a/cdist/conf/type/__hostname/manifest +++ b/cdist/conf/type/__hostname/manifest @@ -38,7 +38,7 @@ case "$os" in # handled in gencode-remote : ;; - centos) + scientific|centos) __key_value sysconfig-hostname \ --file /etc/sysconfig/network \ --delimiter '=' \ diff --git a/cdist/conf/type/__locale/manifest b/cdist/conf/type/__locale/manifest index c1837ae3..d360e9f3 100644 --- a/cdist/conf/type/__locale/manifest +++ b/cdist/conf/type/__locale/manifest @@ -30,7 +30,7 @@ case "$os" in # Debian needs a seperate package __package locales --state present ;; - archlinux|suse|ubuntu|centos) + archlinux|suse|ubuntu|scientific|centos) : ;; *) diff --git a/cdist/conf/type/__package/manifest b/cdist/conf/type/__package/manifest index 6b0daa98..c745f85f 100755 --- a/cdist/conf/type/__package/manifest +++ b/cdist/conf/type/__package/manifest @@ -30,7 +30,7 @@ else # By default determine package manager based on operating system os="$(cat "$__global/explorer/os")" case "$os" in - amazon|centos|fedora|redhat) type="yum" ;; + amazon|scientific|centos|fedora|redhat) type="yum" ;; archlinux) type="pacman" ;; debian|ubuntu|devuan) type="apt" ;; freebsd) diff --git a/cdist/conf/type/__package_update_index/gencode-remote b/cdist/conf/type/__package_update_index/gencode-remote index 589e7202..bf6a532d 100755 --- a/cdist/conf/type/__package_update_index/gencode-remote +++ b/cdist/conf/type/__package_update_index/gencode-remote @@ -29,7 +29,7 @@ else # By default determine package manager based on operating system os="$(cat "$__global/explorer/os")" case "$os" in - amazon|centos|fedora|redhat) type="yum" ;; + amazon|scientific|centos|fedora|redhat) type="yum" ;; debian|ubuntu|devuan) type="apt" ;; archlinux) type="pacman" ;; *) diff --git a/cdist/conf/type/__package_upgrade_all/gencode-remote b/cdist/conf/type/__package_upgrade_all/gencode-remote index 4d034816..9dd3ddf6 100755 --- a/cdist/conf/type/__package_upgrade_all/gencode-remote +++ b/cdist/conf/type/__package_upgrade_all/gencode-remote @@ -30,7 +30,7 @@ else # By default determine package manager based on operating system os="$(cat "$__global/explorer/os")" case "$os" in - amazon|centos|fedora|redhat) type="yum" ;; + amazon|scientific|centos|fedora|redhat) type="yum" ;; debian|ubuntu|devuan) type="apt" ;; archlinux) type="pacman" ;; *) diff --git a/cdist/conf/type/__package_yum/gencode-remote b/cdist/conf/type/__package_yum/gencode-remote index 32a794a0..08c5c2b5 100755 --- a/cdist/conf/type/__package_yum/gencode-remote +++ b/cdist/conf/type/__package_yum/gencode-remote @@ -37,7 +37,7 @@ fi state_should="$(cat "$__object/parameter/state")" -if grep -q -E "(centos|redhat|amazon)" "$__global/explorer/os"; then +if grep -q -E "(scientific|centos|redhat|amazon)" "$__global/explorer/os"; then opts="-y --quiet" else opts="--assumeyes --quiet" diff --git a/cdist/conf/type/__postfix/manifest b/cdist/conf/type/__postfix/manifest index 43443e1e..b425e072 100755 --- a/cdist/conf/type/__postfix/manifest +++ b/cdist/conf/type/__postfix/manifest @@ -22,7 +22,7 @@ os=$(cat "$__global/explorer/os") case "$os" in - ubuntu|debian|archlinux|suse|centos|devuan) + ubuntu|debian|archlinux|suse|scientific|centos|devuan) __package postfix --state present ;; *) diff --git a/cdist/conf/type/__postfix_master/manifest b/cdist/conf/type/__postfix_master/manifest index 3d82c526..af71b88e 100755 --- a/cdist/conf/type/__postfix_master/manifest +++ b/cdist/conf/type/__postfix_master/manifest @@ -22,7 +22,7 @@ os=$(cat "$__global/explorer/os") case "$os" in - ubuntu|debian|archlinux|centos|devuan) + ubuntu|debian|archlinux|scientific|centos|devuan) : ;; *) diff --git a/cdist/conf/type/__postfix_postconf/explorer/value b/cdist/conf/type/__postfix_postconf/explorer/value index d451bce6..17126c94 100755 --- a/cdist/conf/type/__postfix_postconf/explorer/value +++ b/cdist/conf/type/__postfix_postconf/explorer/value @@ -22,7 +22,7 @@ os=$("$__explorer/os") case "$os" in - ubuntu|debian|archlinux|suse|centos|devuan) + ubuntu|debian|archlinux|suse|scientific|centos|devuan) : ;; *) diff --git a/cdist/conf/type/__postfix_postconf/gencode-remote b/cdist/conf/type/__postfix_postconf/gencode-remote index b3557640..f886499b 100755 --- a/cdist/conf/type/__postfix_postconf/gencode-remote +++ b/cdist/conf/type/__postfix_postconf/gencode-remote @@ -21,7 +21,7 @@ os=$(cat "$__global/explorer/os") case "$os" in - ubuntu|debian|archlinux|suse|centos|devuan) + ubuntu|debian|archlinux|suse|scientific|centos|devuan) : ;; *) diff --git a/cdist/conf/type/__postfix_reload/gencode-remote b/cdist/conf/type/__postfix_reload/gencode-remote index 7323606c..0efd6022 100755 --- a/cdist/conf/type/__postfix_reload/gencode-remote +++ b/cdist/conf/type/__postfix_reload/gencode-remote @@ -22,7 +22,7 @@ os=$(cat "$__global/explorer/os") case "$os" in - ubuntu|debian|archlinux|centos|devuan) + ubuntu|debian|archlinux|scientific|centos|devuan) echo "postfix reload" ;; *) diff --git a/cdist/conf/type/__start_on_boot/explorer/state b/cdist/conf/type/__start_on_boot/explorer/state index ca0f3a51..d49f01c7 100644 --- a/cdist/conf/type/__start_on_boot/explorer/state +++ b/cdist/conf/type/__start_on_boot/explorer/state @@ -47,7 +47,7 @@ else [ -f "/etc/init/${name}.conf" ] && state="present" ;; - amazon|centos|fedora|owl|redhat) + amazon|scientific|centos|fedora|owl|redhat) state=$(chkconfig --level "$runlevel" "$name" || echo absent) [ "$state" ] || state="present" ;; diff --git a/cdist/conf/type/__start_on_boot/gencode-remote b/cdist/conf/type/__start_on_boot/gencode-remote index 057f9f48..e77132c9 100644 --- a/cdist/conf/type/__start_on_boot/gencode-remote +++ b/cdist/conf/type/__start_on_boot/gencode-remote @@ -59,7 +59,7 @@ case "$state_should" in echo rc-update add \"$name\" \"$target_runlevel\" ;; - amazon|centos|fedora|owl|redhat|suse) + amazon|scientific|centos|fedora|owl|redhat|suse) echo chkconfig \"$name\" on ;; diff --git a/cdist/conf/type/__timezone/manifest b/cdist/conf/type/__timezone/manifest index 8ddfd122..bcbe41c3 100755 --- a/cdist/conf/type/__timezone/manifest +++ b/cdist/conf/type/__timezone/manifest @@ -38,7 +38,7 @@ case "$os" in # whitelist : ;; - centos) + scientific|centos) __package tzdata --state present export require="__package/tzdata" __file /etc/sysconfig/clock \ diff --git a/cdist/conf/type/__yum_repo/manifest b/cdist/conf/type/__yum_repo/manifest index 9bb63c3c..950c3b7a 100755 --- a/cdist/conf/type/__yum_repo/manifest +++ b/cdist/conf/type/__yum_repo/manifest @@ -22,7 +22,7 @@ os=$(cat "$__global/explorer/os") state="$(cat "$__object/parameter/state")" case "$os" in - centos) + scientific|centos) repo_name="$__object_id" export repo_name repo_file="/etc/yum.repos.d/${repo_name}.repo" diff --git a/docs/web/cdist/os.mdwn b/docs/web/cdist/os.mdwn index 24992439..3677f52c 100644 --- a/docs/web/cdist/os.mdwn +++ b/docs/web/cdist/os.mdwn @@ -5,6 +5,7 @@ cdist was tested or is know to run on at least * [Archlinux](http://www.archlinux.org/) * [Debian](http://www.debian.org/) * [CentOS](http://www.centos.org/) + * [Scientific](https://www.scientificlinux.org/) * [Fedora](http://fedoraproject.org/) * [FreeBSD](http://www.freebsd.org) * [Gentoo](http://www.gentoo.org/)