diff options
author | Lassulus <lassulus@googlemail.com> | 2012-12-09 19:29:18 +0100 |
---|---|---|
committer | Lassulus <lassulus@googlemail.com> | 2012-12-09 19:29:18 +0100 |
commit | c12143b68c9904a99e5e18f30db71fd4660733fd (patch) | |
tree | 95c786f7913cde3fdf26e66bb9ea6eb8d182f4e4 /retiolum/scripts/tinc_setup | |
parent | 1fbaa63834a649cf9c96aac9dca1bc566196d64b (diff) |
fixed sudo env
Diffstat (limited to 'retiolum/scripts/tinc_setup')
-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 |