coldhakca / tor-relay-bootstrap

Script to bootstrap a Debian server to be a set-and-forget Tor relay
GNU General Public License v3.0
146 stars 71 forks source link

Detect Sid vs Stretch / Test #21

Closed Phoul closed 7 years ago

Phoul commented 7 years ago

Currently Debian releases are detected by running 'lsb_release -cs'.

On both Sid and Stretch, this results in "Stretch" being returned.

Phoul commented 7 years ago

Other methods that also fail:

sid$ cat /etc/issue Debian GNU/Linux 9

sid$ cat /etc/debian_version 9.0

sid$ cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 9 (stretch)" NAME="Debian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"

Checking what is present in sources.list should work. If we encounter mixed sources, we can fail with a useful message to the user.

Mixed sources should not be encountered on a fresh install for a set-and-forget Debian Tor relay.

Phoul commented 7 years ago

lsb_release -cs now displays "sid" on Sid, need to verify with test / Buster.

Phoul commented 7 years ago

buster displays accurately now as well, closing!