diff options
Diffstat (limited to 'retiolum/scripts/tinc_setup/new_install.sh')
-rwxr-xr-x | retiolum/scripts/tinc_setup/new_install.sh | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 3afae31a..bbf4475e 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -3,10 +3,32 @@ #get sudo if test "${nosudo-false}" != true -a `id -u` != 0; then echo "we're going sudo..." >&2 - exec sudo "$0" "$@" + exec sudo -E "$0" "$@" exit 23 # go to hell fi +# +SUBNET4=${SUBNET4:-10.243} +SUBNET6=${SUBNET6:-42} +TEMPDIR=${TEMPDIR:-/tmp/tinc-install-fu} +HOSTN=${HOSTN:-$(hostname)} +NETNAME=${NETNAME:-retiolum} +MASK4=${MASK4:-16} +MASK6=${MASK6:-16} +URL=${URL:-euer.krebsco.de/retiolum/hosts.tar.gz} + +IRCCHANNEL=${IRCCHANNEL:-"#krebsco"} +IRCSERVER=${IRCSERVER:-"irc.freenode.net"} +IRCPORT=${IRCPORT:-6667} + +OS=${OS:-0} + +IP4=${IP4:-0} +IP6=${IP6:-0} + +RAND4=0 +RAND6=0 + usage() { cat << EOF @@ -104,27 +126,6 @@ find_os() fi } -SUBNET4=${SUBNET4:-10.243} -SUBNET6=${SUBNET6:-42} -TEMPDIR=${TEMPDIR:-/tmp/tinc-install-fu} -HOSTN=${HOSTN:-$(hostname)} -NETNAME=${NETNAME:-retiolum} -MASK4=${MASK4:-16} -MASK6=${MASK6:-16} -URL=${URL:-euer.krebsco.de/retiolum/hosts.tar.gz} - -IRCCHANNEL=${IRCCHANNEL:-"#krebsco"} -IRCSERVER=${IRCSERVER:-"irc.freenode.net"} -IRCPORT=${IRCPORT:-6667} - -OS=${OS:-0} - -IP4=${IP4:-0} -IP6=${IP6:-0} - -RAND4=0 -RAND6=0 - if [ $IP4 -eq 0 ]; then RAND4=1 elif ! check_ip_valid4 $IP4; then |