mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-17 10:10:25 +00:00
Merge pull request #1441 from noelmcloughlin/suse
fix(suse): updates for opensuse tumbleweed
This commit is contained in:
commit
a1754be2e9
1 changed files with 5 additions and 4 deletions
9
bootstrap-salt.sh
Executable file → Normal file
9
bootstrap-salt.sh
Executable file → Normal file
|
@ -996,7 +996,8 @@ __gather_linux_system_info() {
|
|||
# Skip setting DISTRO_NAME this time, splitting CamelCase has failed.
|
||||
# See https://github.com/saltstack/salt-bootstrap/issues/918
|
||||
[ "$n" = "$DISTRO_NAME" ] && DISTRO_NAME="" || DISTRO_NAME="$n"
|
||||
elif [ "${DISTRO_NAME}" = "openSUSE project" ]; then
|
||||
elif [ "$( echo "${DISTRO_NAME}" | grep openSUSE )" != "" ]; then
|
||||
# lsb_release -si returns "openSUSE Tumbleweed" on openSUSE tumbleweed
|
||||
# lsb_release -si returns "openSUSE project" on openSUSE 12.3
|
||||
# lsb_release -si returns "openSUSE" on openSUSE 15.n
|
||||
DISTRO_NAME="opensuse"
|
||||
|
@ -1117,7 +1118,7 @@ __gather_linux_system_info() {
|
|||
n="SUSE"
|
||||
v="${rv}"
|
||||
;;
|
||||
opensuse-leap )
|
||||
opensuse-* )
|
||||
n="opensuse"
|
||||
v="${rv}"
|
||||
;;
|
||||
|
@ -1722,7 +1723,7 @@ echoinfo " Distribution: ${DISTRO_NAME} ${DISTRO_VERSION}"
|
|||
echo
|
||||
|
||||
# Simplify distro name naming on functions
|
||||
DISTRO_NAME_L=$(echo "$DISTRO_NAME" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-zA-Z0-9_ ]//g' | sed -Ee 's/([[:space:]])+/_/g')
|
||||
DISTRO_NAME_L=$(echo "$DISTRO_NAME" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-zA-Z0-9_ ]//g' | sed -Ee 's/([[:space:]])+/_/g' | sed -Ee 's/tumbleweed//' )
|
||||
|
||||
# Simplify version naming on functions
|
||||
if [ "$DISTRO_VERSION" = "" ] || [ ${_SIMPLIFY_VERSION} -eq $BS_FALSE ]; then
|
||||
|
@ -6374,7 +6375,7 @@ install_opensuse_stable_post() {
|
|||
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
|
||||
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
|
||||
|
||||
if [ -f /bin/systemctl ]; then
|
||||
if [ -f /bin/systemctl ] || [ -f /usr/bin/systemctl ]; then
|
||||
systemctl is-enabled salt-$fname.service || (systemctl preset salt-$fname.service && systemctl enable salt-$fname.service)
|
||||
sleep 1
|
||||
systemctl daemon-reload
|
||||
|
|
Loading…
Add table
Reference in a new issue