summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorFelix Richter <Felix.Richter@syntax-fehler.de>2011-05-28 22:41:20 +0200
committerFelix Richter <Felix.Richter@syntax-fehler.de>2011-05-28 22:41:20 +0200
commit5392511e88b7ca77b88b3d16f5991bde70823144 (patch)
tree79cb4fdaa49d685c908fef955ed3ec75950aab68 /modules
parente03f97e961fb71a1188b6902aa8c6406cd816bcc (diff)
install.sh: bugfixes/ does the right thing now
autostart/Makefile: fixed paths as this will only work with debian anyway
Diffstat (limited to 'modules')
-rw-r--r--modules/retiolum/scripts/autostart/Makefile12
-rwxr-xr-xmodules/retiolum/scripts/tinc_setup/install.sh12
2 files changed, 15 insertions, 9 deletions
diff --git a/modules/retiolum/scripts/autostart/Makefile b/modules/retiolum/scripts/autostart/Makefile
index 7ca589e1..aba6bd33 100644
--- a/modules/retiolum/scripts/autostart/Makefile
+++ b/modules/retiolum/scripts/autostart/Makefile
@@ -1,8 +1,14 @@
INIT_FOLDER=/etc/init.d
.phony: all
-all:
+debian:
#TODO change the tinc file before writing
- cp tinc $(INIT_FOLDER)/tinc
- chmod +x $(INIT_FOLDER)/tinc
+ cp tinc /etc/init.d/tinc
+ chmod +x /etc/init.d
echo "retiolum" > /etc/tinc/nets.boot
update-rc.d tinc defaults
+arch:
+ @cp tinc /etc/rc.d
+ @chmod +x /etc/rc.d/tinc
+ @echo "add tinc to DAEMONS in /etc/rc.conf"
+
+
diff --git a/modules/retiolum/scripts/tinc_setup/install.sh b/modules/retiolum/scripts/tinc_setup/install.sh
index de7d2225..9df38df7 100755
--- a/modules/retiolum/scripts/tinc_setup/install.sh
+++ b/modules/retiolum/scripts/tinc_setup/install.sh
@@ -1,10 +1,10 @@
#! /bin/sh
# USE WITH GREAT CAUTION
-make -C ../../ update
+#make -C ../../ update
set -e
-
-CURR=`dirname "$0"`
+DIRNAME=`dirname $0`
+CURR=`readlink -f ${DIRNAME}`
MYBIN=../../bin
netname=retiolum
# create configuration directory for $netname
@@ -30,6 +30,7 @@ then
then
echo "select v4 subnet ip (1-255) :"
read v4num
+ myipv4=10.7.7.$v4num
if [ "$v4num" -gt 0 -a "$v4num" -lt "256" ];
then
echo "check"
@@ -37,7 +38,6 @@ then
echo "you are made of stupid. bailing out"
exit 1
fi
- myipv4=10.7.7.$v4num
fi
echo "Subnet = $myipv4" > hosts/$myname
@@ -47,7 +47,7 @@ else
echo "own host file already exists! will not write again!"
fi
-cp $CURR/tinc-up .
+cp $CURR/tinc-up /etc/tinc/$netname/
cat>tinc.conf<<EOF
Name = $myname
@@ -61,7 +61,7 @@ if [ ! -e rsa_key.priv ]
then
echo "creating new keys"
tincd -n $netname -K
- python ${CURR}/write_channel.py || \
+ python ${CURR}/write_channel.py $myname || \
echo "cannot write public key to IRC, you are on your own. Good Luck"
else
echo "key files already exist, skipping"