mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
Add support for Red Hat Enterprise Server.
* When using the lsb_release binary, at least RHES identified itself like `RedHatEnterpriseServer`. * Added `__camelcase_split()` to handle the above issue. * Added alias functions from `*red_hat_enterprise_linux*` to `*red_hat_enterprise_server*`.
This commit is contained in:
parent
662f4c8266
commit
56da9f18b1
1 changed files with 40 additions and 1 deletions
|
@ -376,6 +376,14 @@ __unquote_string() {
|
|||
echo $@ | sed "s/^\([\"']\)\(.*\)\1\$/\2/g"
|
||||
}
|
||||
|
||||
#--- FUNCTION ----------------------------------------------------------------
|
||||
# NAME: __camelcase_split
|
||||
# DESCRIPTION: Convert CamelCased strings to Camel_Cased
|
||||
#-------------------------------------------------------------------------------
|
||||
__camelcase_split() {
|
||||
echo $@ | sed -r 's/([^A-Z-])([A-Z])/\1 \2/g'
|
||||
}
|
||||
|
||||
#--- FUNCTION ----------------------------------------------------------------
|
||||
# NAME: __sort_release_files
|
||||
# DESCRIPTION: Custom sort function. Alphabetical or numerical sort is not
|
||||
|
@ -429,6 +437,10 @@ __gather_linux_system_info() {
|
|||
rv=$(lsb_release >/dev/null 2>&1)
|
||||
if [ $? -eq 0 ]; then
|
||||
DISTRO_NAME=$(lsb_release -si)
|
||||
if [ "x$(echo "$DISTRO_NAME" | grep RedHat)" != "x" ]; then
|
||||
# Let's convert CamelCase to Camel Case
|
||||
DISTRO_NAME=$(__camelcase_split "$DISTRO_NAME")
|
||||
fi
|
||||
rv=$(lsb_release -sr)
|
||||
[ "${rv}x" != "x" ] && DISTRO_VERSION=$(__parse_version_string "$rv")
|
||||
elif [ -f /etc/lsb-release ]; then
|
||||
|
@ -1201,6 +1213,14 @@ install_red_hat_enterprise_linux_git_deps() {
|
|||
install_red_hat_linux_git_deps
|
||||
}
|
||||
|
||||
install_red_hat_enterprise_server_stable_deps() {
|
||||
install_red_hat_linux_stable_deps
|
||||
}
|
||||
|
||||
install_red_hat_enterprise_server_git_deps() {
|
||||
install_red_hat_linux_git_deps
|
||||
}
|
||||
|
||||
install_red_hat_linux_stable() {
|
||||
install_centos_stable
|
||||
}
|
||||
|
@ -1217,6 +1237,14 @@ install_red_hat_enterprise_linux_git() {
|
|||
install_red_hat_linux_git
|
||||
}
|
||||
|
||||
install_red_hat_enterprise_server_stable() {
|
||||
install_red_hat_linux_stable
|
||||
}
|
||||
|
||||
install_red_hat_enterprise_server_git() {
|
||||
install_red_hat_linux_git
|
||||
}
|
||||
|
||||
install_red_hat_linux_stable_post() {
|
||||
install_centos_stable_post
|
||||
}
|
||||
|
@ -1229,7 +1257,6 @@ install_red_hat_linux_git_post() {
|
|||
install_centos_git_post
|
||||
}
|
||||
|
||||
|
||||
install_red_hat_enterprise_linux_stable_post() {
|
||||
install_red_hat_linux_stable_post
|
||||
}
|
||||
|
@ -1241,6 +1268,18 @@ install_red_hat_enterprise_linux_restart_daemons() {
|
|||
install_red_hat_enterprise_linux_git_post() {
|
||||
install_red_hat_linux_git_post
|
||||
}
|
||||
|
||||
install_red_hat_enterprise_server_stable_post() {
|
||||
install_red_hat_linux_stable_post
|
||||
}
|
||||
|
||||
install_red_hat_enterprise_server_restart_daemons() {
|
||||
install_red_hat_linux_restart_daemons
|
||||
}
|
||||
|
||||
install_red_hat_enterprise_server_git_post() {
|
||||
install_red_hat_linux_git_post
|
||||
}
|
||||
#
|
||||
# Ended RedHat Install Functions
|
||||
#
|
||||
|
|
Loading…
Add table
Reference in a new issue