aboutsummaryrefslogtreecommitdiffstats
path: root/packages/torouter-prep
diff options
context:
space:
mode:
authorficus <ficus@robocracy.org>2012-09-23 04:22:14 +0200
committerficus <ficus@robocracy.org>2012-09-23 04:22:14 +0200
commitb1aec80110e822d835f6c97a2320b7dfc5fba039 (patch)
tree3f88cf6ec6a8e2836c91705baf2bfc31ab51d0dd /packages/torouter-prep
parente2973e8ea5c57bfa6ed41293e0250c68d29cfed9 (diff)
downloadtorouter-b1aec80110e822d835f6c97a2320b7dfc5fba039.tar.gz
torouter-b1aec80110e822d835f6c97a2320b7dfc5fba039.zip
possibly functional image builder
Diffstat (limited to 'packages/torouter-prep')
-rw-r--r--packages/torouter-prep/Makefile3
-rw-r--r--packages/torouter-prep/configs/apt-preferences.d-backports3
-rw-r--r--packages/torouter-prep/configs/apt.conf1
-rw-r--r--packages/torouter-prep/configs/etc/apt/sources.list2
-rw-r--r--packages/torouter-prep/configs/etc/default/openntpd (renamed from packages/torouter-prep/configs/openntpd-default)0
-rwxr-xr-xpackages/torouter-prep/configs/etc/default/ttdnsd (renamed from packages/torouter-prep/configs/ttdnsd-default)0
-rw-r--r--packages/torouter-prep/configs/etc/dhcp/dhcpd.conf32
-rw-r--r--packages/torouter-prep/configs/etc/dnsmasq.conf (renamed from packages/torouter-prep/configs/dnsmasq.conf)0
-rw-r--r--packages/torouter-prep/configs/etc/fstab6
-rw-r--r--packages/torouter-prep/configs/etc/hostname (renamed from packages/torouter-prep/configs/hostname)0
-rw-r--r--packages/torouter-prep/configs/etc/hosts7
-rwxr-xr-xpackages/torouter-prep/configs/etc/init.d/first-run71
-rwxr-xr-xpackages/torouter-prep/configs/etc/init.d/proxy61
-rw-r--r--packages/torouter-prep/configs/etc/inittab (renamed from packages/torouter-prep/configs/inittab)0
-rw-r--r--packages/torouter-prep/configs/etc/modprobe.d/blacklist.conf (renamed from packages/torouter-prep/configs/modprobe.d-blacklist.conf)4
-rw-r--r--packages/torouter-prep/configs/etc/mtab0
-rw-r--r--packages/torouter-prep/configs/etc/network/interfaces (renamed from packages/torouter-prep/configs/interfaces)2
-rw-r--r--packages/torouter-prep/configs/etc/ntp.conf (renamed from packages/torouter-prep/configs/ntp.conf)0
-rw-r--r--packages/torouter-prep/configs/etc/openvpn/client.conf0
-rw-r--r--packages/torouter-prep/configs/etc/openvpn/static.key0
l---------packages/torouter-prep/configs/etc/rc1.d/S01first-run1
l---------packages/torouter-prep/configs/etc/rc2.d/S01first-run1
l---------packages/torouter-prep/configs/etc/rc2.d/S50proxy1
-rw-r--r--packages/torouter-prep/configs/etc/resolv.conf2
-rw-r--r--packages/torouter-prep/configs/etc/ssh/sshd_config/sshd_config (renamed from packages/torouter-prep/configs/sshd_config)0
-rw-r--r--packages/torouter-prep/configs/etc/sysctl.conf5
-rw-r--r--packages/torouter-prep/configs/etc/tor/torrc (renamed from packages/torouter-prep/configs/torrc)0
-rw-r--r--packages/torouter-prep/configs/etc/udev/rules.d/75-persistent-net-generator.rules0
-rw-r--r--packages/torouter-prep/configs/fstab2
-rw-r--r--packages/torouter-prep/configs/hosts1
-rw-r--r--packages/torouter-prep/configs/sbin/copy2dream47
-rw-r--r--packages/torouter-prep/configs/sources.list29
-rw-r--r--packages/torouter-prep/configs/tmp/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.apt-keybin0 -> 3742 bytes
-rw-r--r--packages/torouter-prep/debian/changelog2
-rw-r--r--packages/torouter-prep/debian/files2
-rwxr-xr-x[-rw-r--r--]packages/torouter-prep/src/torouter_config.sh30
-rwxr-xr-x[-rw-r--r--]packages/torouter-prep/src/torouter_takeover.sh0
37 files changed, 256 insertions, 59 deletions
diff --git a/packages/torouter-prep/Makefile b/packages/torouter-prep/Makefile
index 8fbf692..be5548f 100644
--- a/packages/torouter-prep/Makefile
+++ b/packages/torouter-prep/Makefile
@@ -5,9 +5,10 @@ build:
install:
install -o root -g root -m 750 src/torouter_config.sh $(DESTDIR)/usr/bin
+ install -o root -g root -m 750 src/torouter_preboot.sh $(DESTDIR)/usr/bin
install -o root -g root -m 750 src/torouter_takeover.sh $(DESTDIR)/usr/bin
mkdir -p $(DESTDIR)/usr/share/torouter-prep
- cp -ar configs $(DESTDIR)/usr/share/torouter-prep/example-configs/
+ cp -ar configs/ $(DESTDIR)/usr/share/torouter-prep/example-configs/
clean:
echo "nothing to clean"
diff --git a/packages/torouter-prep/configs/apt-preferences.d-backports b/packages/torouter-prep/configs/apt-preferences.d-backports
deleted file mode 100644
index 8e9275b..0000000
--- a/packages/torouter-prep/configs/apt-preferences.d-backports
+++ /dev/null
@@ -1,3 +0,0 @@
-Package: *
-Pin: release a=squeeze-backports
-Pin-Priority: 200
diff --git a/packages/torouter-prep/configs/apt.conf b/packages/torouter-prep/configs/apt.conf
deleted file mode 100644
index 4143a94..0000000
--- a/packages/torouter-prep/configs/apt.conf
+++ /dev/null
@@ -1 +0,0 @@
-APT::Default-Release "stable";
diff --git a/packages/torouter-prep/configs/etc/apt/sources.list b/packages/torouter-prep/configs/etc/apt/sources.list
new file mode 100644
index 0000000..c06710c
--- /dev/null
+++ b/packages/torouter-prep/configs/etc/apt/sources.list
@@ -0,0 +1,2 @@
+deb http://http.debian.net/debian wheezy main
+deb-src http://http.debian.net/debian wheezy main
diff --git a/packages/torouter-prep/configs/openntpd-default b/packages/torouter-prep/configs/etc/default/openntpd
index 318e7bd..318e7bd 100644
--- a/packages/torouter-prep/configs/openntpd-default
+++ b/packages/torouter-prep/configs/etc/default/openntpd
diff --git a/packages/torouter-prep/configs/ttdnsd-default b/packages/torouter-prep/configs/etc/default/ttdnsd
index 0a22bc4..0a22bc4 100755
--- a/packages/torouter-prep/configs/ttdnsd-default
+++ b/packages/torouter-prep/configs/etc/default/ttdnsd
diff --git a/packages/torouter-prep/configs/etc/dhcp/dhcpd.conf b/packages/torouter-prep/configs/etc/dhcp/dhcpd.conf
new file mode 100644
index 0000000..ec502c6
--- /dev/null
+++ b/packages/torouter-prep/configs/etc/dhcp/dhcpd.conf
@@ -0,0 +1,32 @@
+#
+# FreedomBox ISC dhcpd configuration
+#
+#
+
+# The ddns-updates-style parameter controls whether or not the server will
+# attempt to do a DNS update when a lease is confirmed. We default to the
+# behavior of the version 2 packages ('none', since DHCP v2 didn't
+# have support for DDNS.)
+ddns-update-style none;
+
+# option definitions common to all supported networks...
+option domain-name "free.dom";
+option domain-name-servers ns1.free.dom, ns2.free.dom;
+
+default-lease-time 600;
+max-lease-time 7200;
+
+# If this DHCP server is the official DHCP server for the local
+# network, the authoritative directive should be uncommented.
+authoritative;
+
+# Use this to send dhcp log messages to a different log file (you also
+# have to hack syslog.conf to complete the redirection).
+log-facility local7;
+
+# basic subnet configuration for the 'downstream' wired network
+
+subnet 192.168.1.0 netmask 255.255.255.0 {
+ range 192.168.1.10 192.168.1.100;
+ option routers 192.168.1.1;
+}
diff --git a/packages/torouter-prep/configs/dnsmasq.conf b/packages/torouter-prep/configs/etc/dnsmasq.conf
index 2711486..2711486 100644
--- a/packages/torouter-prep/configs/dnsmasq.conf
+++ b/packages/torouter-prep/configs/etc/dnsmasq.conf
diff --git a/packages/torouter-prep/configs/etc/fstab b/packages/torouter-prep/configs/etc/fstab
new file mode 100644
index 0000000..7c48827
--- /dev/null
+++ b/packages/torouter-prep/configs/etc/fstab
@@ -0,0 +1,6 @@
+/dev/sdc2 / auto relatime,rw 0 0
+proc /proc proc none 0 0
+sys /sys sysfs none 0 0
+none /dev/pts devpts defaults 0 0
+tmpfs /tmp tmpfs rw,nosuid,nodev 0 0
+/dev/sdc1 /boot vfat defaults 0 0
diff --git a/packages/torouter-prep/configs/hostname b/packages/torouter-prep/configs/etc/hostname
index a4a2962..a4a2962 100644
--- a/packages/torouter-prep/configs/hostname
+++ b/packages/torouter-prep/configs/etc/hostname
diff --git a/packages/torouter-prep/configs/etc/hosts b/packages/torouter-prep/configs/etc/hosts
new file mode 100644
index 0000000..42dbc33
--- /dev/null
+++ b/packages/torouter-prep/configs/etc/hosts
@@ -0,0 +1,7 @@
+127.0.0.1 localhost torouter
+::1 localhost ip6-localhost ip6-loopback
+fe00::0 ip6-localnet
+ff00::0 ip6-mcastprefix
+ff02::1 ip6-allnodes
+ff02::2 ip6-allrouters
+
diff --git a/packages/torouter-prep/configs/etc/init.d/first-run b/packages/torouter-prep/configs/etc/init.d/first-run
new file mode 100755
index 0000000..8df2c2d
--- /dev/null
+++ b/packages/torouter-prep/configs/etc/init.d/first-run
@@ -0,0 +1,71 @@
+#!/bin/bash
+#
+# Script to complete the post-install process on first FBX boot.
+
+### BEGIN INIT INFO
+# Provides: first-run
+# Default-Start: 1 2
+# Required-Start: 2
+# Required-Stop:
+# Default-Stop:
+# Short-Description: Finish FBX install on DreamPlug
+### END INIT INFO
+
+function tweak-kernel {
+ # Update the kernel unless requested otherwise.
+
+ if [ -e /var/freedombox/dont-tweak-kernel ]
+ then
+ rm /var/freedombox/dont-tweak-kernel
+ else
+ kernel_version="$(/bin/ls $mountpoint/boot/vmlinuz-*-kirkwood | sort -rn | head -n1 | sed s#$mountpoint/boot/vmlinuz-##)"
+
+ mount -t proc proc /proc
+ flash-kernel $kernel_version
+ umount /proc
+ fi
+}
+
+function wifi-ap-setup {
+ # configure wireless access point with spinifex's prebuilt firmware
+
+ echo "Sleeping 30s for DHCP"
+ sleep 30 # wait for dhcp
+
+ echo "Installing UAP Firmware."
+ wget -O /tmp/marvell_wifi_firmware.tar.gz http://www.spinifex.com.au/plugs/downloads/dreamplug/marvell_wifi_firmware.tar.gz
+ tar -C /tmp -zxf /tmp/marvell_wifi_firmware.tar.gz
+ mkdir -p /lib/firmware/mrvl
+ cp /tmp/lib/firmware/mrvl/* /lib/firmware/mrvl
+}
+
+function create-keys {
+ echo "Creating Keys."
+
+ echo "Creating SSH keys."
+ rm /etc/ssh/ssh_host_*
+ dpkg-reconfigure openssh-server
+
+ echo "Need to create other keys."
+ # gpg --batch --gen-key
+ # see http://lists.gnupg.org/pipermail/gnupg-users/2003-March/017376.html
+}
+
+function remove-self {
+ rm -f /etc/init.d/first-run
+ rm -f /etc/rc1.d/S01first-run
+ rm -f /etc/rc2.d/S01first-run
+ rm /etc/init.d/first-run
+ rm /etc/rc1.d/S01first-run
+ rm /etc/rc2.d/S01first-run
+}
+
+create-keys
+# wifi-ap-setup
+
+# the last things we do before quitting.
+tweak-kernel
+remove-self
+
+echo "Kernel flashed. Rebooting."
+reboot
diff --git a/packages/torouter-prep/configs/etc/init.d/proxy b/packages/torouter-prep/configs/etc/init.d/proxy
new file mode 100755
index 0000000..901507b
--- /dev/null
+++ b/packages/torouter-prep/configs/etc/init.d/proxy
@@ -0,0 +1,61 @@
+#! /bin/sh
+
+### BEGIN INIT INFO
+# Provides: proxy
+# Required-Start: $network $remote_fs $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Proxy for clients.
+### END INIT INFO
+
+set -e
+
+INTIF1="eth0"
+INTIF2="uap0"
+EXTIF="eth1"
+EXTIP="`/sbin/ifconfig $EXTIF | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'`"
+
+loadModules() {
+ depmod -a
+ modprobe ip_tables
+ modprobe ip_conntrack
+ modprobe ip_conntrack_ftp
+ modprobe ip_conntrack_irc
+ modprobe iptable_nat
+ modprobe ip_nat_ftp
+}
+
+setProc() {
+ echo "1" > /proc/sys/net/ipv4/ip_forward
+ echo "1" > /proc/sys/net/ipv4/ip_dynaddr
+}
+
+configIpTables() {
+ iptables -P INPUT ACCEPT
+ iptables -F INPUT
+ iptables -P OUTPUT ACCEPT
+ iptables -F OUTPUT
+ iptables -P FORWARD DROP
+ iptables -F FORWARD
+ iptables -t nat -F
+
+ iptables -A FORWARD -i $EXTIF -o $INTIF1 -m state --state ESTABLISHED,RELATED -j ACCEPT
+ iptables -A FORWARD -i $EXTIF -o $INTIF2 -m state --state ESTABLISHED,RELATED -j ACCEPT
+ iptables -A FORWARD -i $INTIF1 -o $EXTIF -j ACCEPT
+ iptables -A FORWARD -i $INTIF2 -o $EXTIF -j ACCEPT
+
+ iptables -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
+}
+
+case "$1" in
+ start)
+ loadModules
+ setProc
+ configIpTables
+ ;;
+ *)
+ log_success_msg "Usage: /etc/init.d/proxy {start}"
+ exit 1
+ ;;
+esac
diff --git a/packages/torouter-prep/configs/inittab b/packages/torouter-prep/configs/etc/inittab
index 98dca83..98dca83 100644
--- a/packages/torouter-prep/configs/inittab
+++ b/packages/torouter-prep/configs/etc/inittab
diff --git a/packages/torouter-prep/configs/modprobe.d-blacklist.conf b/packages/torouter-prep/configs/etc/modprobe.d/blacklist.conf
index e14a9d0..dfb7967 100644
--- a/packages/torouter-prep/configs/modprobe.d-blacklist.conf
+++ b/packages/torouter-prep/configs/etc/modprobe.d/blacklist.conf
@@ -24,7 +24,3 @@ blacklist iTCO_wdt
# We do not need or want ipv6 right now
blacklist ipv6
-
-# This wireless driver does not give us AP support, sadly
-blacklist libertas
-blacklist libertas_sdio
diff --git a/packages/torouter-prep/configs/etc/mtab b/packages/torouter-prep/configs/etc/mtab
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/torouter-prep/configs/etc/mtab
diff --git a/packages/torouter-prep/configs/interfaces b/packages/torouter-prep/configs/etc/network/interfaces
index fdc8765..255075f 100644
--- a/packages/torouter-prep/configs/interfaces
+++ b/packages/torouter-prep/configs/etc/network/interfaces
@@ -7,7 +7,7 @@ iface lo inet loopback
# The primary network interface
auto eth0
-iface eth0 inet dhcp
+iface eth0 inet manual
post-up ifup uap0
post-down ifdown uap0
diff --git a/packages/torouter-prep/configs/ntp.conf b/packages/torouter-prep/configs/etc/ntp.conf
index cb7d021..cb7d021 100644
--- a/packages/torouter-prep/configs/ntp.conf
+++ b/packages/torouter-prep/configs/etc/ntp.conf
diff --git a/packages/torouter-prep/configs/etc/openvpn/client.conf b/packages/torouter-prep/configs/etc/openvpn/client.conf
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/torouter-prep/configs/etc/openvpn/client.conf
diff --git a/packages/torouter-prep/configs/etc/openvpn/static.key b/packages/torouter-prep/configs/etc/openvpn/static.key
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/torouter-prep/configs/etc/openvpn/static.key
diff --git a/packages/torouter-prep/configs/etc/rc1.d/S01first-run b/packages/torouter-prep/configs/etc/rc1.d/S01first-run
new file mode 120000
index 0000000..e24a808
--- /dev/null
+++ b/packages/torouter-prep/configs/etc/rc1.d/S01first-run
@@ -0,0 +1 @@
+../init.d/first-run \ No newline at end of file
diff --git a/packages/torouter-prep/configs/etc/rc2.d/S01first-run b/packages/torouter-prep/configs/etc/rc2.d/S01first-run
new file mode 120000
index 0000000..e24a808
--- /dev/null
+++ b/packages/torouter-prep/configs/etc/rc2.d/S01first-run
@@ -0,0 +1 @@
+../init.d/first-run \ No newline at end of file
diff --git a/packages/torouter-prep/configs/etc/rc2.d/S50proxy b/packages/torouter-prep/configs/etc/rc2.d/S50proxy
new file mode 120000
index 0000000..9855df4
--- /dev/null
+++ b/packages/torouter-prep/configs/etc/rc2.d/S50proxy
@@ -0,0 +1 @@
+../init.d/proxy \ No newline at end of file
diff --git a/packages/torouter-prep/configs/etc/resolv.conf b/packages/torouter-prep/configs/etc/resolv.conf
new file mode 100644
index 0000000..af9304d
--- /dev/null
+++ b/packages/torouter-prep/configs/etc/resolv.conf
@@ -0,0 +1,2 @@
+nameserver 208.67.222.222
+nameserver 208.67.220.220
diff --git a/packages/torouter-prep/configs/sshd_config b/packages/torouter-prep/configs/etc/ssh/sshd_config/sshd_config
index d079ac0..d079ac0 100644
--- a/packages/torouter-prep/configs/sshd_config
+++ b/packages/torouter-prep/configs/etc/ssh/sshd_config/sshd_config
diff --git a/packages/torouter-prep/configs/etc/sysctl.conf b/packages/torouter-prep/configs/etc/sysctl.conf
new file mode 100644
index 0000000..916e972
--- /dev/null
+++ b/packages/torouter-prep/configs/etc/sysctl.conf
@@ -0,0 +1,5 @@
+# Reduce writes to flash drives
+vm.laptop_mode=5
+vm.swappiness=0
+vm.dirty_writeback_centisecs=1500
+vm.dirty_expire_centisecs=1500
diff --git a/packages/torouter-prep/configs/torrc b/packages/torouter-prep/configs/etc/tor/torrc
index 5023d57..5023d57 100644
--- a/packages/torouter-prep/configs/torrc
+++ b/packages/torouter-prep/configs/etc/tor/torrc
diff --git a/packages/torouter-prep/configs/etc/udev/rules.d/75-persistent-net-generator.rules b/packages/torouter-prep/configs/etc/udev/rules.d/75-persistent-net-generator.rules
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/torouter-prep/configs/etc/udev/rules.d/75-persistent-net-generator.rules
diff --git a/packages/torouter-prep/configs/fstab b/packages/torouter-prep/configs/fstab
deleted file mode 100644
index 292e521..0000000
--- a/packages/torouter-prep/configs/fstab
+++ /dev/null
@@ -1,2 +0,0 @@
-# This is the weird boot partition (hopefully ext2/3/4 later)
-/dev/sda1 /boot vfat nodev,noexec,nosuid 0 0
diff --git a/packages/torouter-prep/configs/hosts b/packages/torouter-prep/configs/hosts
deleted file mode 100644
index 9a3311b..0000000
--- a/packages/torouter-prep/configs/hosts
+++ /dev/null
@@ -1 +0,0 @@
- 127.0.0.1 localhost torouter
diff --git a/packages/torouter-prep/configs/sbin/copy2dream b/packages/torouter-prep/configs/sbin/copy2dream
new file mode 100644
index 0000000..267c2b6
--- /dev/null
+++ b/packages/torouter-prep/configs/sbin/copy2dream
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# this script assumes the current root filesystem is the source, and the
+# internal microSD on a DreamPlug is the target .. all existing content on
+# the microSD card will be lost.
+#
+
+# partition microSD card inside DreamPlug
+echo "=> partition internal microSD card"
+parted -s /dev/sda mklabel msdos
+parted -s /dev/sda mkpart primary fat16 0 128
+parted -s /dev/sda mkpart primary ext2 128 100%
+
+# create filesystems on new partitions
+echo "=> create filesystems on internal microSD card"
+mkdosfs /dev/sda1
+mke2fs -j /dev/sda2
+
+echo "=> mount target partitions"
+mount /dev/sda2 /media
+mkdir -p /media/boot
+mount /dev/sda1 /media/boot
+
+echo "=> copy filesystem content from USB stick to target partitions"
+(cd / ; tar cpSf - `/bin/ls | grep -v boot | grep -v proc | grep -v sys | grep -v media | grep -v dev`) | (cd /media ; tar xpf -)
+# the following intentionally ignores subdirectories
+cp /boot/* /media/boot/
+
+echo "=> touch up target root partition"
+mkdir /media/proc /media/sys /media/media /media/dev
+mknod /media/dev/console c 5 1
+mknod /media/dev/random c 1 8
+mknod /media/dev/urandom c 1 9
+mknod /media/dev/null c 1 3
+mknod /media/dev/ptmx c 5 2
+
+# patch up /etc/fstab entry for /boot
+sed -e 's/sdc/sda/g' < /etc/fstab > /media/etc/fstab
+
+# flash the kernel and create the device's keys
+chroot /media /etc/init.d/first-run
+
+echo "unmount target partitions"
+umount /dev/sda1
+umount /dev/sda2
+
+echo "=> installation complete, see docs to boot from internal microSD"
diff --git a/packages/torouter-prep/configs/sources.list b/packages/torouter-prep/configs/sources.list
deleted file mode 100644
index 42bc62b..0000000
--- a/packages/torouter-prep/configs/sources.list
+++ /dev/null
@@ -1,29 +0,0 @@
-deb http://ftp.de.debian.org/pub/debian/ squeeze main non-free contrib
-deb-src http://ftp.de.debian.org/pub/debian/ squeeze main non-free contrib
-deb http://security.debian.org/ squeeze/updates main
-
-# Sid for uaputl
-deb http://ftp.debian.org/debian sid main
-
-# experimental for natpmp
-deb http://ftp.debian.org/debian experimental main
-deb-src http://ftp.debian.org/debian experimental main
-
-# backports for upnp
-deb http://backports.debian.org/debian-backports squeeze-backports main
-
-# Tor project repo
-deb http://deb.torproject.org/torproject.org/ squeeze main
-deb-src http://deb.torproject.org/torproject.org squeeze main
-
-# Tor project experimental package repo
-deb http://deb.torproject.org/torproject.org experimental-squeeze main
-deb-src http://deb.torproject.org/torproject.org experimental-squeeze main
-
-# Tor 0.2.3.x package repo
-deb http://deb.torproject.org/torproject.org tor-0.2.3.x-stable main
-deb-src http://deb.torproject.org/torproject.org tor-0.2.3.x-stable main
-
-
-# Torouter project repo
-deb http://torrouter.torproject.org/torrouter torrouter main
diff --git a/packages/torouter-prep/configs/tmp/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.apt-key b/packages/torouter-prep/configs/tmp/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.apt-key
new file mode 100644
index 0000000..5b6a4d3
--- /dev/null
+++ b/packages/torouter-prep/configs/tmp/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.apt-key
Binary files differ
diff --git a/packages/torouter-prep/debian/changelog b/packages/torouter-prep/debian/changelog
index 14ff45a..9b94c42 100644
--- a/packages/torouter-prep/debian/changelog
+++ b/packages/torouter-prep/debian/changelog
@@ -1,4 +1,4 @@
-torouter-prep (0.0.1-1) unstable; urgency=low
+torouter-prep (0.0.1-dev) unstable; urgency=low
* Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
diff --git a/packages/torouter-prep/debian/files b/packages/torouter-prep/debian/files
index 298935e..f19b131 100644
--- a/packages/torouter-prep/debian/files
+++ b/packages/torouter-prep/debian/files
@@ -1 +1 @@
-torouter-prep_0.0.1-1_all.deb unknown extra
+torouter-prep_0.0.1-dev_all.deb unknown extra
diff --git a/packages/torouter-prep/src/torouter_config.sh b/packages/torouter-prep/src/torouter_config.sh
index 93e8608..96bfaad 100644..100755
--- a/packages/torouter-prep/src/torouter_config.sh
+++ b/packages/torouter-prep/src/torouter_config.sh
@@ -24,15 +24,15 @@ apt-key add $config_dir/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.apt-key
apt-key add $config_dir/047E6A24.asc
# Set us to have a default host name and hosts file
-cp $config_dir/hostname /etc/hostname
-cp $config_dir/hosts /etc/hosts
+cp $config_dir/etc/hostname /etc/hostname
+cp $config_dir/etc/hosts /etc/hosts
# We need to prep apt to understand that we want packages from other repos
cp $config_dir/sources.list /etc/apt/sources.list
# We're creating this file to ensure we get updates
-cp $config_dir/apt-preferences.d-backports /etc/apt/preferences.d/backports
-cp $config_dir/apt.conf /etc/apt/apt.conf
+cp $config_dir/etc/apt/apt-preferences.d/backports /etc/apt/preferences.d/backports
+cp $config_dir/etc/apt/apt.conf /etc/apt/apt.conf
apt-get -y update
@@ -104,33 +104,33 @@ apt-get -y install unbound
zcat $config_dir/armrc.sample.gz > ~$ADMINUSER/.armrc
# Reconfigure /etc/inittab here
-cp $config_dir/inittab /etc/inittab
+cp $config_dir/etc/inittab /etc/inittab
# Reconfigure fstab
-cp $config_dir/fstab /etc/fstab
+cp $config_dir/etc/fstab /etc/fstab
# Configure the network
# eth0 is our "internet" interface with a dhcp client
-cp $config_dir/interfaces /etc/network/interfaces
+cp $config_dir/etc/network/interfaces /etc/network/interfaces
# Configure dnsmasq
-cp $config_dir/dnsmasq.conf /etc/dnsmasq.conf
+cp $config_dir/etc/dnsmasq.conf /etc/dnsmasq.conf
# Configure ntp
-cp $config_dir/ntp.conf /etc/ntp.conf
-cp $config_dir/openntpd-default /etc/default/openntpd
+cp $config_dir/etc/ntp.conf /etc/ntp.conf
+cp $config_dir/etc/default/openntpd /etc/default/openntpd
# Configure ssh
-cp $config_dir/sshd_config /etc/ssh/sshd_config
+cp $config_dir/etc/ssh/sshd_config /etc/ssh/sshd_config
# XXX We should configure ufw here
# XXX We should configure denyhosts
-cp $config_dir/torrc /etc/tor/torrc
-cp $config_dir/ttdnsd-default /etc/default/ttdnsd
+cp $config_dir/etc/tor/torrc /etc/tor/torrc
+cp $config_dir/etc/default/ttdnsd /etc/default/ttdnsd
# Configure sshd
-cp $config_dir/sshd_config /etc/ssh/sshd_config
+cp $config_dir/etc/ssh/sshd_config /etc/ssh/sshd_config
# Clean up our cache
apt-get -f -y remove --purge polipo minissdpd
@@ -145,7 +145,7 @@ apt-get -y clean
apt-get install -f
## Disable ipv6 support for now
-cp $config_dir/modprobe.d-blacklist.conf /etc/modprobe.d/blacklist.conf
+cp $config_dir/etc/modprobe.d/blacklist.conf /etc/modprobe.d/blacklist.conf
# We don't need this if the ipv6 module is not loaded
#echo net.ipv6.conf.all.disable_ipv6=1 > /etc/sysctl.d/disableipv6.conf
##
diff --git a/packages/torouter-prep/src/torouter_takeover.sh b/packages/torouter-prep/src/torouter_takeover.sh
index 2b76502..2b76502 100644..100755
--- a/packages/torouter-prep/src/torouter_takeover.sh
+++ b/packages/torouter-prep/src/torouter_takeover.sh