Fedora
This commit is contained in:
16
setup.sh
16
setup.sh
@@ -45,8 +45,20 @@ read
|
||||
|
||||
if ! [ -e /usr/bin/salt-call ]; then
|
||||
set -x
|
||||
if [[ "$(uname -m)" =~ arm* ]] || [[ "$DISTRO" == "fedora" ]]; then
|
||||
[ -e /opt/saltstack/salt ] ||
|
||||
if [[ "$DISTRO" == "fedora" ]]; then
|
||||
echo -e "${CYAN}Fedora detected - installing Python3.10 if not present, then using a venv${NC}"
|
||||
if ! which python3.10 &>/dev/null; then
|
||||
wget -O /usr/local/bin/python3.10 https://github.com/niess/python-appimage/releases/download/python3.10/python3.10.13-cp310-cp310-manylinux_2_28_x86_64.AppImage
|
||||
chmod +x /usr/local/bin/python3.10
|
||||
fi
|
||||
[ -e /opt/saltstack/salt ] ||
|
||||
/usr/local/bin/python3.10 -m venv /opt/saltstack/salt
|
||||
/opt/saltstack/salt/bin/pip3 freeze | grep -q ^salt== ||
|
||||
/opt/saltstack/salt/bin/pip3 install "salt==$SALT_VERSION"
|
||||
ln -sfT /opt/saltstack/salt/bin/salt-call /usr/bin/salt-call
|
||||
elif [[ "$(uname -m)" =~ arm* ]]; then
|
||||
echo -e "${CYAN}Arm CPU detected. Using venv install method${NC}"
|
||||
[ -e /opt/saltstack/salt ] ||
|
||||
python3 -m venv /opt/saltstack/salt
|
||||
/opt/saltstack/salt/bin/pip3 freeze | grep -q ^salt== ||
|
||||
/opt/saltstack/salt/bin/pip3 install "salt==$SALT_VERSION"
|
||||
|
||||
Reference in New Issue
Block a user