From 0124dceeea93bf9cb8e4b7c23c9a0cef15ee7089 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 29 Jan 2013 17:46:36 +0100 Subject: OS-strings instead of numbers --- retiolum/scripts/tinc_setup/new_install.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'retiolum/scripts') 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/ -- cgit v1.2.3