forked from ungleich-public/cdist
Add scientific
This commit is contained in:
parent
98160624a0
commit
9300eda3c6
22 changed files with 26 additions and 20 deletions
|
@ -72,6 +72,11 @@ if [ -f /etc/owl-release ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### Redhat and derivatives
|
### 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
|
if grep -q ^CentOS /etc/redhat-release 2>/dev/null; then
|
||||||
echo centos
|
echo centos
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -54,7 +54,7 @@ case "$($__explorer/os)" in
|
||||||
owl)
|
owl)
|
||||||
cat /etc/owl-release
|
cat /etc/owl-release
|
||||||
;;
|
;;
|
||||||
redhat|centos|mitel)
|
redhat|centos|mitel|scientific)
|
||||||
cat /etc/redhat-release
|
cat /etc/redhat-release
|
||||||
;;
|
;;
|
||||||
slackware)
|
slackware)
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
os=$(cat "$__global/explorer/os")
|
os=$(cat "$__global/explorer/os")
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
centos|redhat|ubuntu|debian|archlinux|gentoo)
|
scientific|centos|redhat|ubuntu|debian|archlinux|gentoo)
|
||||||
# any linux should work
|
# any linux should work
|
||||||
:
|
:
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
os=$(cat "$__global/explorer/os")
|
os=$(cat "$__global/explorer/os")
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
centos|debian|redhat|ubuntu)
|
scientific|centos|debian|redhat|ubuntu)
|
||||||
# whitelist safeguard
|
# whitelist safeguard
|
||||||
:
|
:
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
os=$(cat "$__global/explorer/os")
|
os=$(cat "$__global/explorer/os")
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
centos|redhat)
|
scientific|centos|redhat)
|
||||||
# whitelist safeguard
|
# whitelist safeguard
|
||||||
service_onchange='service consul-template status >/dev/null && service consul-template reload || true' \
|
service_onchange='service consul-template status >/dev/null && service consul-template reload || true' \
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -40,7 +40,7 @@ case "$os" in
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
centos)
|
scientific|centos)
|
||||||
if [ "$name_sysconfig" = "$name_should" -a "$name_running" = "$name_should" ]; then
|
if [ "$name_sysconfig" = "$name_should" -a "$name_running" = "$name_should" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -38,7 +38,7 @@ case "$os" in
|
||||||
# handled in gencode-remote
|
# handled in gencode-remote
|
||||||
:
|
:
|
||||||
;;
|
;;
|
||||||
centos)
|
scientific|centos)
|
||||||
__key_value sysconfig-hostname \
|
__key_value sysconfig-hostname \
|
||||||
--file /etc/sysconfig/network \
|
--file /etc/sysconfig/network \
|
||||||
--delimiter '=' \
|
--delimiter '=' \
|
||||||
|
|
|
@ -30,7 +30,7 @@ case "$os" in
|
||||||
# Debian needs a seperate package
|
# Debian needs a seperate package
|
||||||
__package locales --state present
|
__package locales --state present
|
||||||
;;
|
;;
|
||||||
archlinux|suse|ubuntu|centos)
|
archlinux|suse|ubuntu|scientific|centos)
|
||||||
:
|
:
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -30,7 +30,7 @@ else
|
||||||
# By default determine package manager based on operating system
|
# By default determine package manager based on operating system
|
||||||
os="$(cat "$__global/explorer/os")"
|
os="$(cat "$__global/explorer/os")"
|
||||||
case "$os" in
|
case "$os" in
|
||||||
amazon|centos|fedora|redhat) type="yum" ;;
|
amazon|scientific|centos|fedora|redhat) type="yum" ;;
|
||||||
archlinux) type="pacman" ;;
|
archlinux) type="pacman" ;;
|
||||||
debian|ubuntu|devuan) type="apt" ;;
|
debian|ubuntu|devuan) type="apt" ;;
|
||||||
freebsd)
|
freebsd)
|
||||||
|
|
|
@ -29,7 +29,7 @@ else
|
||||||
# By default determine package manager based on operating system
|
# By default determine package manager based on operating system
|
||||||
os="$(cat "$__global/explorer/os")"
|
os="$(cat "$__global/explorer/os")"
|
||||||
case "$os" in
|
case "$os" in
|
||||||
amazon|centos|fedora|redhat) type="yum" ;;
|
amazon|scientific|centos|fedora|redhat) type="yum" ;;
|
||||||
debian|ubuntu|devuan) type="apt" ;;
|
debian|ubuntu|devuan) type="apt" ;;
|
||||||
archlinux) type="pacman" ;;
|
archlinux) type="pacman" ;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -30,7 +30,7 @@ else
|
||||||
# By default determine package manager based on operating system
|
# By default determine package manager based on operating system
|
||||||
os="$(cat "$__global/explorer/os")"
|
os="$(cat "$__global/explorer/os")"
|
||||||
case "$os" in
|
case "$os" in
|
||||||
amazon|centos|fedora|redhat) type="yum" ;;
|
amazon|scientific|centos|fedora|redhat) type="yum" ;;
|
||||||
debian|ubuntu|devuan) type="apt" ;;
|
debian|ubuntu|devuan) type="apt" ;;
|
||||||
archlinux) type="pacman" ;;
|
archlinux) type="pacman" ;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -37,7 +37,7 @@ fi
|
||||||
|
|
||||||
state_should="$(cat "$__object/parameter/state")"
|
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"
|
opts="-y --quiet"
|
||||||
else
|
else
|
||||||
opts="--assumeyes --quiet"
|
opts="--assumeyes --quiet"
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
os=$(cat "$__global/explorer/os")
|
os=$(cat "$__global/explorer/os")
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
ubuntu|debian|archlinux|suse|centos|devuan)
|
ubuntu|debian|archlinux|suse|scientific|centos|devuan)
|
||||||
__package postfix --state present
|
__package postfix --state present
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
os=$(cat "$__global/explorer/os")
|
os=$(cat "$__global/explorer/os")
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
ubuntu|debian|archlinux|centos|devuan)
|
ubuntu|debian|archlinux|scientific|centos|devuan)
|
||||||
:
|
:
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
os=$("$__explorer/os")
|
os=$("$__explorer/os")
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
ubuntu|debian|archlinux|suse|centos|devuan)
|
ubuntu|debian|archlinux|suse|scientific|centos|devuan)
|
||||||
:
|
:
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
os=$(cat "$__global/explorer/os")
|
os=$(cat "$__global/explorer/os")
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
ubuntu|debian|archlinux|suse|centos|devuan)
|
ubuntu|debian|archlinux|suse|scientific|centos|devuan)
|
||||||
:
|
:
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
os=$(cat "$__global/explorer/os")
|
os=$(cat "$__global/explorer/os")
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
ubuntu|debian|archlinux|centos|devuan)
|
ubuntu|debian|archlinux|scientific|centos|devuan)
|
||||||
echo "postfix reload"
|
echo "postfix reload"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -47,7 +47,7 @@ else
|
||||||
[ -f "/etc/init/${name}.conf" ] && state="present"
|
[ -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=$(chkconfig --level "$runlevel" "$name" || echo absent)
|
||||||
[ "$state" ] || state="present"
|
[ "$state" ] || state="present"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -59,7 +59,7 @@ case "$state_should" in
|
||||||
echo rc-update add \"$name\" \"$target_runlevel\"
|
echo rc-update add \"$name\" \"$target_runlevel\"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
amazon|centos|fedora|owl|redhat|suse)
|
amazon|scientific|centos|fedora|owl|redhat|suse)
|
||||||
echo chkconfig \"$name\" on
|
echo chkconfig \"$name\" on
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ case "$os" in
|
||||||
# whitelist
|
# whitelist
|
||||||
:
|
:
|
||||||
;;
|
;;
|
||||||
centos)
|
scientific|centos)
|
||||||
__package tzdata --state present
|
__package tzdata --state present
|
||||||
export require="__package/tzdata"
|
export require="__package/tzdata"
|
||||||
__file /etc/sysconfig/clock \
|
__file /etc/sysconfig/clock \
|
||||||
|
|
|
@ -22,7 +22,7 @@ os=$(cat "$__global/explorer/os")
|
||||||
state="$(cat "$__object/parameter/state")"
|
state="$(cat "$__object/parameter/state")"
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
centos)
|
scientific|centos)
|
||||||
repo_name="$__object_id"
|
repo_name="$__object_id"
|
||||||
export repo_name
|
export repo_name
|
||||||
repo_file="/etc/yum.repos.d/${repo_name}.repo"
|
repo_file="/etc/yum.repos.d/${repo_name}.repo"
|
||||||
|
|
|
@ -5,6 +5,7 @@ cdist was tested or is know to run on at least
|
||||||
* [Archlinux](http://www.archlinux.org/)
|
* [Archlinux](http://www.archlinux.org/)
|
||||||
* [Debian](http://www.debian.org/)
|
* [Debian](http://www.debian.org/)
|
||||||
* [CentOS](http://www.centos.org/)
|
* [CentOS](http://www.centos.org/)
|
||||||
|
* [Scientific](https://www.scientificlinux.org/)
|
||||||
* [Fedora](http://fedoraproject.org/)
|
* [Fedora](http://fedoraproject.org/)
|
||||||
* [FreeBSD](http://www.freebsd.org)
|
* [FreeBSD](http://www.freebsd.org)
|
||||||
* [Gentoo](http://www.gentoo.org/)
|
* [Gentoo](http://www.gentoo.org/)
|
||||||
|
|
Loading…
Reference in a new issue