diff options
author | Lassulus <lassulus@googlemail.com> | 2012-12-27 22:46:35 +0100 |
---|---|---|
committer | Lassulus <lassulus@googlemail.com> | 2012-12-27 22:46:35 +0100 |
commit | 1fcbb7ddbdaa598c9efee2d33f759b17d90762ca (patch) | |
tree | 14748f414968d52b381e743963babfdf0df5ee72 /retiolum | |
parent | 40d9d06aeb49c900aec886b0249596817ac828e4 (diff) | |
parent | b298094174d3e06045c98bff441206a806896cfb (diff) |
Merge branch 'master' of github.com:krebscode/painload
Diffstat (limited to 'retiolum')
-rw-r--r-- | retiolum/hosts/filebitch | 10 | ||||
-rw-r--r-- | retiolum/hosts/filebitchin | 10 | ||||
-rwxr-xr-x | retiolum/scripts/tinc_setup/new_install.sh | 25 |
3 files changed, 22 insertions, 23 deletions
diff --git a/retiolum/hosts/filebitch b/retiolum/hosts/filebitch deleted file mode 100644 index d23f98f2..00000000 --- a/retiolum/hosts/filebitch +++ /dev/null @@ -1,10 +0,0 @@ -Subnet = 42:0356:a364:cc79:4c96:2c7c:13fc:0c5b/128 -Subnet = 10.243.131.98/32 ------BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEAoqTUa54dkplzU6IqWdvCiGM8FLpZ6X6AmgGgl5r9RZ+Af08iy4Js -FPdco+1Lj5OthXJnd5Xx8cO5qQx5CRzUN59ec8o0jxQOBZ5EpuN42RLMmQNBJWm7 -moVpEDuPQTHQrlyvsYwXOx1+T4rvSnG7hldiHoCL4XVn8FpZLPMXL5alGHSuNuYq -dG++5LtPpmRLOg0Pwlk3nVfJpKKn4u2FVmhmxe9CdV9c5B5Ze0nVH6sekaG0gXzX -ktoJG83/yc2XYhn+rel4kvLFyP/XqdAxsO6v7mpmQVNgsppqm2A9unDacTfOG//z -2O+/dHkkW7ukOfk2Tr6z/CSDDxySMzx2NwIDAQAB ------END RSA PUBLIC KEY----- diff --git a/retiolum/hosts/filebitchin b/retiolum/hosts/filebitchin new file mode 100644 index 00000000..cd67b1ab --- /dev/null +++ b/retiolum/hosts/filebitchin @@ -0,0 +1,10 @@ +Subnet = 10.243.221.149 +Subnet = 42:9efb:ae54:fdbf:6ec1:6167:6aab:a41e +-----BEGIN RSA PUBLIC KEY----- +MIIBCgKCAQEAqtid32pdLNTOasAf8JW16SmmFJmwx/3PucO2Bpo34dDYWFm5uxyH +MYDTYDXLFRioiWGX2b1/5x7Oqjn0hP3FPuSAWPpyWEspMNmrpwZ1iA3hxQJEvQav +juBQzh18f6JJow+SoosiAfdr9pSoosZEKKbcwiWZ3od05BdKnogQ7bJI1mjSC0xb +9zAtlEKXhtmS8SJAyWKPQjC3coHlWoRq61zsI3/20074mUbFHsXj3jZPgn4Dc2RV +BYx+ZDGviIMhQEKXn9C3VFfVrLZbgheE5xiKFkqRMTWwlbNH/MXwNsrlJq3uAy9H +YuJhTY5XxUjkwCVky5m9QYbxEpl4hlvpnQIDAQAB +-----END RSA PUBLIC KEY----- diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index e83bcbc7..41a1f73a 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -60,7 +60,6 @@ host2subnet() { NEEDDOTSINSUB=$(expr 3 - $(echo $SUBNET4 | sed 's/[0-9]*//g')) FULLSUBNET=$(echo $SUBNET4$(eval "printf '.0'%.0s {1..${#NEEDDOTSINSUB}}"s)) - result=$(($(($((1 << $1)) - 1)) << $((32 - $1)))) byte="" for i in {0..2}; do @@ -121,9 +120,9 @@ get_hostname() #os autodetection find_os() { - if grep -qe 'Linux' /etc/*release 2>/dev/null; then + if grep -qe 'Linux' /etc/*release 2>/dev/null || grep -qe 'Linux' /etc/issue ; then OS=1 - elif which getprop&>/dev/null; then + elif type getprop >/dev/null; then OS=2 elif grep -qe 'OpenWrt' /etc/*release 2>/dev/null; then OS=3 @@ -149,13 +148,13 @@ if [ $OS -eq 0 ]; then fi #check if everything is installed -if ! which awk&>/dev/null; then +if ! type awk >/dev/null; then echo "Please install awk" exit 1 fi -if ! which curl&>/dev/null; then - if ! which wget&>/dev/null; then +if ! type curl >/dev/null; then + if ! type wget >/dev/null; then echo "Please install curl or wget" exit 1 else @@ -243,17 +242,17 @@ 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 ! which tincd&>/dev/null; then + if ! type tincd >/dev/null; then echo "Please install tinc" 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 @@ -338,7 +337,7 @@ EOF host2subnet $MASK4 #check if ip is installed -if which ip&>/dev/null; then +if type ip >/dev/null; then echo 'dirname="`dirname "$0"`"' > tinc-up echo '' >> tinc-up echo 'conf=$dirname/tinc.conf' >> tinc-up @@ -375,7 +374,7 @@ chmod +x tinc-up chown -R root:root . #generate keys with tinc -if which tincctl&>/dev/null; then +if type tincctl >/dev/null; then yes | tincctl -n $NETNAME generate-keys cat rsa_key.pub >> hosts/$HOSTN else |