From 5263d84feb9cf3e96c6993a04446e1ad627de85f Mon Sep 17 00:00:00 2001 From: Lassulus Date: Wed, 16 Jan 2013 14:28:11 +0100 Subject: s/supernode/slowpoke/ --- retiolum/scripts/tinc_setup/new_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'retiolum/scripts/tinc_setup/new_install.sh') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 85a61be8..e07ecff0 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -340,7 +340,7 @@ LocalDiscovery = yes AutoConnect = 3 #ConnectTos -ConnectTo = supernode +ConnectTo = slowpoke ConnectTo = pigstarter ConnectTo = pico EOF -- cgit v1.2.3 From 786c68422411e838efc707a27ae1fc3face765d4 Mon Sep 17 00:00:00 2001 From: Lassulus Date: Wed, 16 Jan 2013 14:44:08 +0100 Subject: removed redundant host detection --- retiolum/scripts/tinc_setup/new_install.sh | 5 ----- 1 file changed, 5 deletions(-) (limited to 'retiolum/scripts/tinc_setup/new_install.sh') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index e07ecff0..fdf0bf04 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -241,11 +241,6 @@ do esac done -#check for OS -if [ $OS -eq 0 ]; then - find_os -fi - #check if everything is installed if [ $OS -eq 2 ]; then if ! test -e /data/data/org.poirsouille.tinc_gui/files/tincd; then -- cgit v1.2.3 From 8660cde95b4f052cfbb74015c71340cb0661d5ba Mon Sep 17 00:00:00 2001 From: Lassulus Date: Wed, 16 Jan 2013 14:58:47 +0100 Subject: removed getopts --- retiolum/scripts/tinc_setup/new_install.sh | 85 ------------------------------ 1 file changed, 85 deletions(-) (limited to 'retiolum/scripts/tinc_setup/new_install.sh') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index fdf0bf04..4dc973d9 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -40,30 +40,6 @@ IP6=${IP6:-0} RAND4=1 RAND6=1 -usage() -{ -cat << EOF -usage $0 options -This script gets you into the KREBS Darknet -all parameters are optional - -Options: - -h Show this message(haha) - -4 \$ipv4 specify an ip(version 4), this also disables random ip mode, default is random - -6 \$ipv6 specify an ip(version 6), this also disables random ip mode, default is random - -s \$SUBNET Choose another Subnet(version4), default is 10.243 - -x \$SUBNET Choose another Subnet(version6), default is 42 - -m \$MASK Choose another Subnet Mask(version4), default is 16 - -j \$MASK Choose another Subnet Mask(version6), default is 16 - -t \$DIR Choose another Temporary directory, default is /tmp/tinc-install-fu - -o \$HOST Choose another Hostname, default is your system hostname - -n \$NET Choose another tincd netname,this also specifies the path to your tinc config, default is retiolum - -u \$URL specify another hostsfiles.tar.gz url, default is http://euer.krebsco.de/retiolum/hosts.tar.gz - -l \$OS specify an OS, numeric parameter.0=Automatic 1=Linux 2=Android, disables automatic OS-finding, default is 0 - -r \$ADDR give the node an reachable remote address, ipv4 or dns -EOF -} - #convert hostmask to subnetmask only version 4 host2subnet() { @@ -180,67 +156,6 @@ if ! $(ping -c 1 -W 5 euer.krebsco.de 1>/dev/null) ;then exit 1 fi - -#parse options -while getopts "h4:6:s:x:m:j:t:o:n:u:l:" OPTION -do - case $OPTION in - h) - usage - exit 1 - ;; - 4) - IP4=$OPTARG - RAND4=0 - if ! check_ip_valid4 $IP4; then echo "ipv4 is invalid" && exit 1; fi - ;; - 6) - IP6=$OPTARG - RAND6=0 - if ! check_ip_valid6 $IP6; then echo "ipv6 is invalid" && exit 1; fi - ;; - s) - SUBNET4=$OPTARG - ;; - x) - SUBNET6=$OPTARG - ;; - m) - MASK4=$OPTARG - ;; - j) - MASK6=$OPTARG - ;; - t) - TEMPDIR=$OPTARG - ;; - o) - HOSTN=$OPTARG - ;; - n) - NETNAME=$OPTARG - ;; - u) - URL=$OPTARG - if $(! curl -s --head $URL | head -n 1 | grep "HTTP/1.[01] [23].." > /dev/null); then - echo "url not reachable" - exit 1 - fi - ;; - l) - OS=$OPTARG - if ! [ "$(echo $OS | awk -F"." ' $0 ~ /^[0-2]$/' )" == $OS ]; then - echo "invalid input for OS" - exit 1 - fi - ;; - r) - ADDR=$OPTARG - ;; - - esac -done - #check if everything is installed if [ $OS -eq 2 ]; then if ! test -e /data/data/org.poirsouille.tinc_gui/files/tincd; then -- cgit v1.2.3 From c00d41c85e4f0b5a7fad0dab7956425cee79a634 Mon Sep 17 00:00:00 2001 From: Lassulus Date: Mon, 21 Jan 2013 20:27:48 +0100 Subject: fix android bug --- retiolum/scripts/tinc_setup/new_install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'retiolum/scripts/tinc_setup/new_install.sh') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 4dc973d9..7dcc3a7b 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -163,8 +163,8 @@ if [ $OS -eq 2 ]; then exit 1 else TINCBIN=/data/data/org.poirsouille.tinc_gui/files/tincd - if [ $TINCDIR = 'auto' ]; then TINCDIR=/usr/local/etc/tinc ;fi - if [ $TEMPDIR = 'auto' ]; then TEMPDIR=/data/secure/data ;fi + if [ $TINCDIR = 'auto' ]; then TINCDIR="/usr/local/etc/tinc" ;fi + if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/data/secure/data" ;fi fi else if ! type tincd >/dev/null; then @@ -172,8 +172,8 @@ else exit 1 else TINCBIN=tincd - if [ $TINCDIR = 'auto' ]; then TINCDIR=/etc/tinc ;fi - if [ $TEMPDIR = 'auto' ]; then TEMPDIR=/tmp/tinc-install-fu ;fi + if [ $TINCDIR = 'auto' ]; then TINCDIR="/etc/tinc" ;fi + if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/tmp/tinc-install-fu" ;fi fi fi -- cgit v1.2.3 From e6451bbd74b54702f09c7130348028f1a89b981c Mon Sep 17 00:00:00 2001 From: Lassulus Date: Mon, 21 Jan 2013 21:04:58 +0100 Subject: fixed path on android --- retiolum/scripts/tinc_setup/new_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'retiolum/scripts/tinc_setup/new_install.sh') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 7dcc3a7b..9fa8a84b 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -163,7 +163,7 @@ if [ $OS -eq 2 ]; then exit 1 else TINCBIN=/data/data/org.poirsouille.tinc_gui/files/tincd - if [ $TINCDIR = 'auto' ]; then TINCDIR="/usr/local/etc/tinc" ;fi + if [ $TINCDIR = 'auto' ]; then TINCDIR="/etc/tinc" ;fi if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/data/secure/data" ;fi fi else -- cgit v1.2.3 From fbcf1a5714a82d1f7eb6ca9d55625f0c910ee315 Mon Sep 17 00:00:00 2001 From: Lassulus Date: Mon, 21 Jan 2013 22:06:40 +0100 Subject: fixes for android --- retiolum/scripts/tinc_setup/new_install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'retiolum/scripts/tinc_setup/new_install.sh') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 9fa8a84b..4552810d 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -163,8 +163,9 @@ if [ $OS -eq 2 ]; then exit 1 else TINCBIN=/data/data/org.poirsouille.tinc_gui/files/tincd - if [ $TINCDIR = 'auto' ]; then TINCDIR="/etc/tinc" ;fi - if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/data/secure/data" ;fi + if [ $TINCDIR = 'auto' ]; then TINCDIR="/usr/local/etc/tinc" ;fi + if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/storage/sdcard0/tinc-fu" ;fi + mount -o remount,rw / fi else if ! type tincd >/dev/null; then -- cgit v1.2.3 From 66979215f1cda8b3af4829b809222161714d430d Mon Sep 17 00:00:00 2001 From: Lassulus Date: Mon, 21 Jan 2013 22:41:42 +0100 Subject: fixed device for android --- retiolum/scripts/tinc_setup/new_install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'retiolum/scripts/tinc_setup/new_install.sh') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 4552810d..e67ec1c0 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -165,7 +165,8 @@ if [ $OS -eq 2 ]; then TINCBIN=/data/data/org.poirsouille.tinc_gui/files/tincd if [ $TINCDIR = 'auto' ]; then TINCDIR="/usr/local/etc/tinc" ;fi if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/storage/sdcard0/tinc-fu" ;fi - mount -o remount,rw / + mount -o remount,rw / + DEV="/dev/tun" fi else if ! type tincd >/dev/null; then @@ -175,6 +176,7 @@ else TINCBIN=tincd if [ $TINCDIR = 'auto' ]; then TINCDIR="/etc/tinc" ;fi if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/tmp/tinc-install-fu" ;fi + DEV="/dev/net/tun" fi fi @@ -244,7 +246,7 @@ echo "Subnet = $IP6" >> hosts/$HOSTN cat>tinc.conf< Date: Mon, 21 Jan 2013 22:43:24 +0100 Subject: fixed whitespace --- retiolum/scripts/tinc_setup/new_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'retiolum/scripts/tinc_setup/new_install.sh') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index e67ec1c0..18096e1f 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -165,7 +165,7 @@ if [ $OS -eq 2 ]; then TINCBIN=/data/data/org.poirsouille.tinc_gui/files/tincd if [ $TINCDIR = 'auto' ]; then TINCDIR="/usr/local/etc/tinc" ;fi if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/storage/sdcard0/tinc-fu" ;fi - mount -o remount,rw / + mount -o remount,rw / DEV="/dev/tun" fi else -- cgit v1.2.3 From 7d1d43e0267ab4ef9998d50a3076ebed5dc107a5 Mon Sep 17 00:00:00 2001 From: Lassulus Date: Wed, 23 Jan 2013 17:37:05 +0100 Subject: more android fixes --- retiolum/scripts/tinc_setup/new_install.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'retiolum/scripts/tinc_setup/new_install.sh') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 18096e1f..65611b1c 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -166,6 +166,7 @@ if [ $OS -eq 2 ]; then if [ $TINCDIR = 'auto' ]; then TINCDIR="/usr/local/etc/tinc" ;fi if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/storage/sdcard0/tinc-fu" ;fi mount -o remount,rw / + mount -o remount,rw /system DEV="/dev/tun" fi else @@ -305,6 +306,12 @@ else yes | $TINCBIN -n $NETNAME -K fi +if [ $OS -eq 2 ]; then + mkdir /etc/tinc + cd / + mv $TINCDIR/$NETNAME /etc/tinc/ + cd /etc/tinc/$NETNAME +fi #write to irc-channel NICK="${HOSTN}_$(head /dev/urandom | tr -dc "0123456789" | head -c3)" -- cgit v1.2.3 From 680b55ab5c2601ead3adfa8050f121e8fa2d7d2c Mon Sep 17 00:00:00 2001 From: Lassulus Date: Mon, 28 Jan 2013 23:11:00 +0100 Subject: moved to new ircchannel --- retiolum/scripts/tinc_setup/new_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'retiolum/scripts/tinc_setup/new_install.sh') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 65611b1c..f8407c98 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -28,7 +28,7 @@ RMASK=${RMASK:-255.255.0.0} URL=${URL:-http://euer.krebsco.de/retiolum/hosts.tar.gz} SURL=${SURL:-http://euer.krebsco.de/retiolum/supernodes.tar.gz} -IRCCHANNEL=${IRCCHANNEL:-"#krebsco"} +IRCCHANNEL=${IRCCHANNEL:-"#krebs"} IRCSERVER=${IRCSERVER:-"irc.freenode.net"} IRCPORT=${IRCPORT:-6667} -- cgit v1.2.3 From 41a72197fa4e84668bd8e93cf23923581f9f8d91 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 29 Jan 2013 16:14:30 +0000 Subject: fix chown incompatibility --- retiolum/scripts/tinc_setup/new_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'retiolum/scripts/tinc_setup/new_install.sh') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index f8407c98..4cfa9699 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -296,7 +296,7 @@ fi #fix permissions chmod +x tinc-up -chown -R root:root . +chown -R 0:0 . #generate keys with tinc if type tincctl >/dev/null; then -- cgit v1.2.3 From d221dc6c4a959edbbab7dde34020d9ce46897b8e Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 29 Jan 2013 16:18:04 +0000 Subject: refactor type in new_install --- retiolum/scripts/tinc_setup/new_install.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'retiolum/scripts/tinc_setup/new_install.sh') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 4cfa9699..12c0588b 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -12,9 +12,10 @@ SUBNET4=${SUBNET4:-10.243} SUBNET6=${SUBNET6:-42} TEMPDIR=${TEMPDIR:-auto} TINCDIR=${TINCDIR:-auto} +exists() { type "$1" >/dev/null 2>/dev/null; } -if type hostname >/dev/null ;then SYSHOSTN=${HOSTNAME:-$(hostname)} -elif type uci >/dev/null ;then SYSHOSTN=$(uci get system.@system[0].hostname) +if exists hostname ;then SYSHOSTN=${HOSTNAME:-$(hostname)} +elif exists uci ;then SYSHOSTN=$(uci get system.@system[0].hostname) elif [ -e /etc/hostname ] ;then SYSHOSTN=$(cat /etc/hostname) else SYSHOSTN="unknown" fi @@ -106,7 +107,7 @@ find_os() { if grep -qe 'Linux' /etc/*release 2>/dev/null || grep -qe 'Linux' /etc/issue 2>/dev/null; then OS=1 - elif type getprop >/dev/null; then + elif exists getprop ; then OS=2 elif test -e /etc/openwrt_release; then OS=3 @@ -135,13 +136,13 @@ if [ $OS -eq 0 ]; then fi #check if everything is installed -if ! type awk >/dev/null; then +if ! exists awk ; then echo "Please install awk" exit 1 fi -if ! type curl >/dev/null; then - if ! type wget >/dev/null; then +if ! exists curl ; then + if ! exists wget ; then echo "Please install curl or wget" exit 1 else @@ -299,7 +300,7 @@ chmod +x tinc-up chown -R 0:0 . #generate keys with tinc -if type tincctl >/dev/null; then +if exists tincctl ; then yes | tincctl -n $NETNAME generate-keys cat rsa_key.pub >> hosts/$HOSTN else -- cgit v1.2.3 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/tinc_setup/new_install.sh') 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 From 702b0bd06cf86a296243470e0a4ca9fe20c01407 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 29 Jan 2013 17:55:01 +0100 Subject: osx proto added --- retiolum/scripts/tinc_setup/new_install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'retiolum/scripts/tinc_setup/new_install.sh') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index e2049a4b..a52d1edc 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -111,6 +111,8 @@ find_os() OS='android' elif test -e /etc/openwrt_release; then OS='openwrt' + elif uname -s | grep -qi 'darwin'; then + OS='osx' else echo "Cannot determine your operating system, falling back to Linux" OS='linux' @@ -170,8 +172,11 @@ if [ $OS = 'android' ]; then mount -o remount,rw /system DEV="/dev/tun" fi +#elif [ $OS = 'osx' ]; then +# echo 'this is not implemented' +# exit 1 else - if ! type tincd >/dev/null; then + if ! exists tincd >/dev/null; then echo "Please install tinc" exit 1 else -- cgit v1.2.3 From 58c8c76afbf980c22715272b6de1ae9287bddbe3 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 29 Jan 2013 18:05:20 +0100 Subject: more osx support --- retiolum/scripts/tinc_setup/new_install.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'retiolum/scripts/tinc_setup/new_install.sh') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index a52d1edc..1ff42e54 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -166,24 +166,31 @@ if [ $OS = 'android' ]; then exit 1 else TINCBIN=/data/data/org.poirsouille.tinc_gui/files/tincd + DEV="/dev/tun" if [ $TINCDIR = 'auto' ]; then TINCDIR="/usr/local/etc/tinc" ;fi if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/storage/sdcard0/tinc-fu" ;fi mount -o remount,rw / mount -o remount,rw /system - DEV="/dev/tun" fi -#elif [ $OS = 'osx' ]; then -# echo 'this is not implemented' -# exit 1 +elif [ $OS = 'osx' ]; then + if ! exists tincd >/dev/null; then + echo "Please install tinc" + exit 1 + else + TINCBIN=tincd + DEV="/dev/net/tun" + if [ $TINCDIR = 'auto' ]; then TINCDIR="/usr/local/etc/tinc" ;fi + if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/tmp/tinc-install-fu" ;fi + fi else if ! exists tincd >/dev/null; then echo "Please install tinc" exit 1 else TINCBIN=tincd + DEV="/dev/net/tun" if [ $TINCDIR = 'auto' ]; then TINCDIR="/etc/tinc" ;fi if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/tmp/tinc-install-fu" ;fi - DEV="/dev/net/tun" fi fi @@ -268,7 +275,7 @@ EOF host2subnet $MASK4 #check if ip is installed -if type ip >/dev/null; then +if exists ip >/dev/null; then echo 'dirname="`dirname "$0"`"' > tinc-up echo '' >> tinc-up echo 'conf=$dirname/tinc.conf' >> tinc-up -- cgit v1.2.3