added distro detection
This commit is contained in:
parent
7f0a6a5e05
commit
5e7e1f9423
1 changed files with 13 additions and 0 deletions
|
@ -1,2 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
get_distro(){
|
||||||
|
arch=$(uname -m)
|
||||||
|
kernel=$(uname -r)
|
||||||
|
if [ -f /etc/lsb-release ]; then
|
||||||
|
os=$(lsb_release -s -d)
|
||||||
|
elif [ -f /etc/debian_version ]; then
|
||||||
|
os="Debian $(cat /etc/debian_version)"
|
||||||
|
elif [ -f /etc/redhat-release ]; then
|
||||||
|
os=`cat /etc/redhat-release`
|
||||||
|
else
|
||||||
|
os="$(uname -s) $(uname -r)"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue