summaryrefslogtreecommitdiffstats
path: root/retiolum/scripts/tinc_setup
diff options
context:
space:
mode:
authorlassulus <lassulus@googlemail.com>2013-01-29 17:46:36 +0100
committerlassulus <lassulus@googlemail.com>2013-01-29 17:46:36 +0100
commit0124dceeea93bf9cb8e4b7c23c9a0cef15ee7089 (patch)
treee0bac3d4beacf61ab2d6df269d52656ba22f4cb9 /retiolum/scripts/tinc_setup
parent3a559eee66f8bd5efac8b7df39b40c6e89a769ad (diff)
OS-strings instead of numbers
Diffstat (limited to 'retiolum/scripts/tinc_setup')
-rwxr-xr-xretiolum/scripts/tinc_setup/new_install.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh
index 12c0588b..e2049a4b 100755
--- a/retiolum/scripts/tinc_setup/new_install.sh
+++ b/retiolum/scripts/tinc_setup/new_install.sh
@@ -106,14 +106,14 @@ get_hostname()
find_os()
{
if grep -qe 'Linux' /etc/*release 2>/dev/null || grep -qe 'Linux' /etc/issue 2>/dev/null; then
- OS=1
+ OS='linux'
elif exists getprop ; then
- OS=2
+ OS='android'
elif test -e /etc/openwrt_release; then
- OS=3
+ OS='openwrt'
else
echo "Cannot determine your operating system, falling back to Linux"
- OS=1
+ OS='linux'
fi
}
@@ -158,7 +158,7 @@ if ! $(ping -c 1 -W 5 euer.krebsco.de 1>/dev/null) ;then
fi
#check if everything is installed
-if [ $OS -eq 2 ]; then
+if [ $OS = 'android' ]; then
if ! test -e /data/data/org.poirsouille.tinc_gui/files/tincd; then
echo "Please install tinc-gui"
exit 1
@@ -234,7 +234,7 @@ get_hostname $HOSTN
mkdir -p $TINCDIR/$NETNAME
cd $TINCDIR/$NETNAME
-if [ $OS -eq 3 ]; then
+if [ $OS = 'openwrt' ]; then
mkdir hosts
$LOADER $SURL | tar xz -C hosts/
else
@@ -307,7 +307,7 @@ else
yes | $TINCBIN -n $NETNAME -K
fi
-if [ $OS -eq 2 ]; then
+if [ $OS = 'android' ]; then
mkdir /etc/tinc
cd /
mv $TINCDIR/$NETNAME /etc/tinc/