commit
55cd9963db
24 changed files with 40 additions and 20 deletions
|
@ -22,6 +22,17 @@
|
|||
|
||||
# FIXME: other system types (not linux ...)
|
||||
|
||||
if [ -d "/proc/vz" -a ! -d "/proc/bc" ]; then
|
||||
echo openvz
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -e "/proc/1/environ" ] &&
|
||||
cat "/proc/1/environ" | tr '\000' '\n' | grep -Eiq '^container='; then
|
||||
echo lxc
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -r /proc/cpuinfo ]; then
|
||||
# this should only exist on virtual guest machines,
|
||||
# tested on vmware, xen, kvm
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
:
|
||||
;;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
os=$(cat "$__global/explorer/os")
|
||||
|
||||
case "$os" in
|
||||
centos|debian|redhat|ubuntu)
|
||||
scientific|centos|debian|redhat|ubuntu)
|
||||
# whitelist safeguard
|
||||
:
|
||||
;;
|
||||
|
|
|
@ -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' \
|
||||
;;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -38,7 +38,7 @@ case "$os" in
|
|||
# handled in gencode-remote
|
||||
:
|
||||
;;
|
||||
centos)
|
||||
scientific|centos)
|
||||
__key_value sysconfig-hostname \
|
||||
--file /etc/sysconfig/network \
|
||||
--delimiter '=' \
|
||||
|
|
|
@ -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)
|
||||
:
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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" ;;
|
||||
*)
|
||||
|
|
|
@ -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" ;;
|
||||
*)
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
os=$(cat "$__global/explorer/os")
|
||||
|
||||
case "$os" in
|
||||
ubuntu|debian|archlinux|centos|devuan)
|
||||
ubuntu|debian|archlinux|scientific|centos|devuan)
|
||||
:
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
os=$("$__explorer/os")
|
||||
|
||||
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")
|
||||
|
||||
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")
|
||||
|
||||
case "$os" in
|
||||
ubuntu|debian|archlinux|centos|devuan)
|
||||
ubuntu|debian|archlinux|scientific|centos|devuan)
|
||||
echo "postfix reload"
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -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"
|
||||
;;
|
||||
|
|
|
@ -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
|
||||
;;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ case "$os" in
|
|||
# whitelist
|
||||
:
|
||||
;;
|
||||
centos)
|
||||
scientific|centos)
|
||||
__package tzdata --state present
|
||||
export require="__package/tzdata"
|
||||
__file /etc/sysconfig/clock \
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -10,6 +10,9 @@ next:
|
|||
* New type: __jail_freebsd9: Handle jail management on FreeBSD <= 9.X (Jake Guffey)
|
||||
* New type: __jail_freebsd10: Handle jail management on FreeBSD >= 10.0 (Jake Guffey)
|
||||
* Type __jail: Dynamically select the correct jail subtype based on target host OS (Jake Guffey)
|
||||
* Explorer __machine_type: add openvz and lxc
|
||||
* Explorer __os __os_version: add scientific
|
||||
* Type various: add scientific
|
||||
|
||||
4.1.0: 2016-05-27
|
||||
* Documentation: Migrate to reStructuredText format and sphinx (Darko Poljak)
|
||||
|
|
|
@ -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/)
|
||||
|
|
Loading…
Reference in a new issue