aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfreedom-maker/source/etc/init.d/proxy61
l---------freedom-maker/source/etc/rc2.d/S50proxy1
-rwxr-xr-xpackages/torouter-prep/configs/etc/init.d/first-run71
l---------packages/torouter-prep/configs/etc/rc1.d/S01first-run1
l---------packages/torouter-prep/configs/etc/rc2.d/S01first-run1
5 files changed, 0 insertions, 135 deletions
diff --git a/freedom-maker/source/etc/init.d/proxy b/freedom-maker/source/etc/init.d/proxy
deleted file mode 100755
index 901507b..0000000
--- a/freedom-maker/source/etc/init.d/proxy
+++ /dev/null
@@ -1,61 +0,0 @@
-#! /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/freedom-maker/source/etc/rc2.d/S50proxy b/freedom-maker/source/etc/rc2.d/S50proxy
deleted file mode 120000
index 9855df4..0000000
--- a/freedom-maker/source/etc/rc2.d/S50proxy
+++ /dev/null
@@ -1 +0,0 @@
-../init.d/proxy \ No newline at end of file
diff --git a/packages/torouter-prep/configs/etc/init.d/first-run b/packages/torouter-prep/configs/etc/init.d/first-run
deleted file mode 100755
index 8df2c2d..0000000
--- a/packages/torouter-prep/configs/etc/init.d/first-run
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/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/rc1.d/S01first-run b/packages/torouter-prep/configs/etc/rc1.d/S01first-run
deleted file mode 120000
index e24a808..0000000
--- a/packages/torouter-prep/configs/etc/rc1.d/S01first-run
+++ /dev/null
@@ -1 +0,0 @@
-../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
deleted file mode 120000
index e24a808..0000000
--- a/packages/torouter-prep/configs/etc/rc2.d/S01first-run
+++ /dev/null
@@ -1 +0,0 @@
-../init.d/first-run \ No newline at end of file