From bb2c3ab8682316583e6866200678494965f81719 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 3 May 2013 23:43:46 +0200 Subject: add 'this is $NAME' in install-script --- retiolum/scripts/tinc_setup/new_install.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'retiolum/scripts') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index db154877..4884f7fe 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -332,6 +332,7 @@ NICK="${HOSTN}_$(head /dev/urandom | tr -dc "0123456789" | head -c3)" echo "USER $NICK $IRCSERVER bla : $NICK"; echo "JOIN $IRCCHANNEL"; sleep 23; + echo "PRIVMSG $IRCCHANNEL : This is $HOSTN"; sed "s/^\(.*\)/PRIVMSG $IRCCHANNEL : \1/" hosts/$HOSTN; sleep 5; ) | telnet $IRCSERVER $IRCPORT -- cgit v1.2.3 From 4e68bae28e4ea5973c3f5ec487a5b7451747ec68 Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 10 May 2013 17:39:49 +0200 Subject: changed room for incoming hosts --- retiolum/scripts/tinc_setup/new_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'retiolum/scripts') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 4884f7fe..8c7d4af8 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -29,7 +29,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:-"#krebs"} +IRCCHANNEL=${IRCCHANNEL:-"#krebs_incoming"} IRCSERVER=${IRCSERVER:-"irc.freenode.net"} IRCPORT=${IRCPORT:-6667} -- cgit v1.2.3 From 6969ff5928efce07a66c8b28bebc596918ce494a Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 21 May 2013 09:35:13 +0200 Subject: telnet binary will now be found: use either telnet or busybox --- retiolum/scripts/tinc_setup/new_install.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'retiolum/scripts') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 8c7d4af8..bd057cf8 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -34,6 +34,7 @@ IRCSERVER=${IRCSERVER:-"irc.freenode.net"} IRCPORT=${IRCPORT:-6667} OS=${OS:-0} +TELNET=${TELNET:-} IP4=${IP4:-0} IP6=${IP6:-0} @@ -119,6 +120,18 @@ find_os() fi } +find_telnet(){ + if command -v telnet >/dev/null;then + TELNET="`command -v telnet`" + elif command -v busybox >/dev/null;then + TELNET="`command -v busybox` telnet" + else + echo "cannot find telnet binary, please install either telnet-client or busybox" + echo "bailing out!" + exit 1 + fi +} + if [ $IP4 -eq 0 ]; then RAND4=1 elif ! check_ip_valid4 $IP4; then @@ -136,7 +149,9 @@ fi if [ $OS -eq 0 ]; then find_os fi - +if [ -z "$TELNET" ]; then + find_telnet +fi #check if everything is installed if ! exists awk ; then echo "Please install awk" @@ -334,7 +349,7 @@ NICK="${HOSTN}_$(head /dev/urandom | tr -dc "0123456789" | head -c3)" sleep 23; echo "PRIVMSG $IRCCHANNEL : This is $HOSTN"; sed "s/^\(.*\)/PRIVMSG $IRCCHANNEL : \1/" hosts/$HOSTN; - sleep 5; ) | telnet $IRCSERVER $IRCPORT + sleep 5; ) | $TELNET $IRCSERVER $IRCPORT # finish what you have begun! -- cgit v1.2.3 From 5611bcc9425a27e0edb8158235d9e2ba646c3d69 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 22 May 2013 10:36:17 +0200 Subject: new_install now uses the LOADER instead of ping to check if internet is available --- retiolum/scripts/tinc_setup/new_install.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'retiolum/scripts') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index bd057cf8..6f3739a9 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -121,9 +121,9 @@ find_os() } find_telnet(){ - if command -v telnet >/dev/null;then + if exists elnet >/dev/null;then TELNET="`command -v telnet`" - elif command -v busybox >/dev/null;then + elif exists busybox >/dev/null;then TELNET="`command -v busybox` telnet" else echo "cannot find telnet binary, please install either telnet-client or busybox" @@ -164,13 +164,15 @@ if ! exists curl ; then exit 1 else LOADER='wget -O-' + HEAD_LOADER="$LOADER --spider" fi else LOADER=curl + HEAD_LOADER=$LOADER -I fi -if ! $(ping -c 1 -W 5 euer.krebsco.de 1>/dev/null) ;then - echo "Cant reach euer, check if your internet is working" +if ! $HEAD_LOADER $SURL >;then + echo "Cannot find supernode package, check if your internet is working" exit 1 fi -- cgit v1.2.3 From 6386df1621d2e44dc8144571a85b84c1966d4c47 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 22 May 2013 10:40:55 +0200 Subject: fix syntax-error in new_install --- retiolum/scripts/tinc_setup/new_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'retiolum/scripts') diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 6f3739a9..57d59e25 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -171,7 +171,7 @@ else HEAD_LOADER=$LOADER -I fi -if ! $HEAD_LOADER $SURL >;then +if ! $HEAD_LOADER $SURL >/dev/null 2>/dev/null ;then echo "Cannot find supernode package, check if your internet is working" exit 1 fi -- cgit v1.2.3