zerotier / install.zerotier.com

Source for https://install.zerotier.com curl|bash installer
https://install.zerotier.com
BSD 3-Clause "New" or "Revised" License
58 stars 41 forks source link

Installation script is broken for SUSE distributions #21

Open bartmichu opened 3 years ago

bartmichu commented 3 years ago

When detecting Linux distribution, installation script assumes /etc/SuSE-release file exists for SUSE distros. That fails on new versions because it has been removed.

toor@HOLODECK:~> lsb_release -a
LSB Version:    n/a
Distributor ID: openSUSE
Description:    openSUSE Tumbleweed
Release:    20210325
Codename:   n/a
toor@HOLODECK:~> curl -s https://install.zerotier.com | sudo bash
[sudo] password for root: 

*** ZeroTier One Quick Install for Unix-like Systems

*** Tested distributions and architectures:
***   MacOS (10.7+) on x86_64 (just installs ZeroTier One.pkg)
***   Debian (7+) on x86_64, x86, arm, and arm64
***   RedHat/CentOS (6+) on x86_64 and x86
***   Fedora (16+) on x86_64 and x86
***   SuSE (12+) on x86_64 and x86
***   Mint (18+) on x86_64, x86, arm, and arm64

*** Please report problems to contact@zerotier.com and we will try to fix.

*** Detecting Linux Distribution

*** Package installation failed! Unfortunately there may not be a package
*** for your architecture or distribution. For the source go to:
*** https://github.com/zerotier/ZeroTierOne

Additional information

OpenSUSE documentation has an article for third-party software developers, who wish to add SUSE and openSUSE distros compatibility into their software.

In short, /usr/lib/os-release is the way to go.

nukebloodaxe commented 3 years ago

For much excitement, and a workaround, you can create a soft-link to the /etc/os-release file in /etc using the following command: sudo ln -s /etc/os-release /etc/SuSE-release

Alternatively, if you prefer to do it the "official" SUSE way, do: sudo ln -s /usr/lib/os-release /etc/SuSE-release

I am assuming you have sudo installed and configured correctly. If not, you can also run the command as root without the sudo prefix.

Please note, I've not tested this, so if anyone finds it works, please reply. If it does not work, but you tweak it to do so, reply with changes. Ideally, the Zerotier team should make minor tweaks to the installation script to bring it in line with modern Linux distro release conventions.