From 86ab91c3f7eb1bf8e7989d3793e37fa52741b892 Mon Sep 17 00:00:00 2001 From: ficus Date: Mon, 24 Sep 2012 16:23:04 +0200 Subject: moved most freedom-maker config to central config (excluding firstboot) --- freedom-maker/buildrootfs.sh | 2 + .../multistrap-configs/torouter-base.conf | 2 +- freedom-maker/source/etc/apt/sources.list | 2 - freedom-maker/source/etc/dhcp/dhcpd.conf | 32 -------------- freedom-maker/source/etc/dnsmasq.conf | 24 ----------- freedom-maker/source/etc/fstab | 6 --- freedom-maker/source/etc/hosts | 7 --- freedom-maker/source/etc/mtab | 0 freedom-maker/source/etc/network/interfaces | 25 ----------- freedom-maker/source/etc/openvpn/client.conf | 0 freedom-maker/source/etc/openvpn/static.key | 0 freedom-maker/source/etc/resolv.conf | 2 - freedom-maker/source/etc/sysctl.conf | 5 --- .../udev/rules.d/75-persistent-net-generator.rules | 0 freedom-maker/source/sbin/copy2dream | 47 --------------------- ...3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.apt-key | Bin 3742 -> 0 bytes 16 files changed, 3 insertions(+), 151 deletions(-) delete mode 100644 freedom-maker/source/etc/apt/sources.list delete mode 100644 freedom-maker/source/etc/dhcp/dhcpd.conf delete mode 100644 freedom-maker/source/etc/dnsmasq.conf delete mode 100644 freedom-maker/source/etc/fstab delete mode 100644 freedom-maker/source/etc/hosts delete mode 100644 freedom-maker/source/etc/mtab delete mode 100644 freedom-maker/source/etc/network/interfaces delete mode 100644 freedom-maker/source/etc/openvpn/client.conf delete mode 100644 freedom-maker/source/etc/openvpn/static.key delete mode 100644 freedom-maker/source/etc/resolv.conf delete mode 100644 freedom-maker/source/etc/sysctl.conf delete mode 100644 freedom-maker/source/etc/udev/rules.d/75-persistent-net-generator.rules delete mode 100644 freedom-maker/source/sbin/copy2dream delete mode 100644 freedom-maker/source/tmp/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.apt-key (limited to 'freedom-maker') diff --git a/freedom-maker/buildrootfs.sh b/freedom-maker/buildrootfs.sh index b3dc568..9dad31e 100755 --- a/freedom-maker/buildrootfs.sh +++ b/freedom-maker/buildrootfs.sh @@ -102,6 +102,8 @@ umount $target/var/cache/apt/ # copy! echo "Copying the source directory to the torouter rootfs..." rsync -av $source/ $target +echo "Copying the torouter config directory to the torouter rootfs..." +rsync -av ../configs/ $target # add extra packages to the image bin/packages diff --git a/freedom-maker/multistrap-configs/torouter-base.conf b/freedom-maker/multistrap-configs/torouter-base.conf index 25bcc6a..45945a7 100644 --- a/freedom-maker/multistrap-configs/torouter-base.conf +++ b/freedom-maker/multistrap-configs/torouter-base.conf @@ -6,7 +6,7 @@ debootstrap=Debian torproject torouter aptsources=Debian torproject torouter [Debian] -packages=base-files netbase openssh-server zile wget iproute net-tools hostname module-init-tools wget resolvconf udev isc-dhcp-client ifupdown devio initramfs-tools uboot-mkimage parted dosfstools apt iputils-ping haveged python pandoc python-simplejson make isc-dhcp-server dialog locales-all uaputl uapevent dnsmasq iptables vim-nox less screen lsof tcptraceroute traceroute mtr-tiny openntpd dnsmasq unbound python-augeas python-flask python-daemon cron +packages=base-files netbase openssh-server zile wget iproute net-tools hostname module-init-tools wget resolvconf udev isc-dhcp-client ifupdown devio initramfs-tools uboot-mkimage parted dosfstools apt iputils-ping haveged python pandoc python-simplejson make isc-dhcp-server dialog locales-all uaputl uapevent dnsmasq iptables vim-nox less screen lsof tcptraceroute traceroute mtr-tiny openntpd dnsmasq unbound python-augeas python-flask python-daemon cron iw source=http://http.debian.net/debian/ keyring=debian-archive-keyring suite=wheezy diff --git a/freedom-maker/source/etc/apt/sources.list b/freedom-maker/source/etc/apt/sources.list deleted file mode 100644 index c06710c..0000000 --- a/freedom-maker/source/etc/apt/sources.list +++ /dev/null @@ -1,2 +0,0 @@ -deb http://http.debian.net/debian wheezy main -deb-src http://http.debian.net/debian wheezy main diff --git a/freedom-maker/source/etc/dhcp/dhcpd.conf b/freedom-maker/source/etc/dhcp/dhcpd.conf deleted file mode 100644 index ec502c6..0000000 --- a/freedom-maker/source/etc/dhcp/dhcpd.conf +++ /dev/null @@ -1,32 +0,0 @@ -# -# 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/freedom-maker/source/etc/dnsmasq.conf b/freedom-maker/source/etc/dnsmasq.conf deleted file mode 100644 index 71403d7..0000000 --- a/freedom-maker/source/etc/dnsmasq.conf +++ /dev/null @@ -1,24 +0,0 @@ -log-facility=DAEMON - -local=/fbx/ -local=/freedombox/ - -# Upstream DNS server -# FIXME this should be updated on boot. -server=192.168.0.1@eth1 - -# We will serve this DNS domain -# (DHCP hosts will receive a .lan suffix in DNS) -domain=lan - -# We're the authoritative dhcpd -# Read the manpage for a good explanation of what this does -dhcp-authoritative - -# We are going to serve hosts for: -# - LAN (192.168.1.0/24) (Only static hosts) -# - WLAN (192.168.2.0/24) -# New clients will receive an IP from the WLAN range. - -dhcp-range=interface:eth0,set:lan,192.168.1.10,192.168.1.100,255.255.255.0,2h -# dhcp-range=interface:uap0,set:lan,192.168.2.10,192.168.2.100,255.255.255.0,2h diff --git a/freedom-maker/source/etc/fstab b/freedom-maker/source/etc/fstab deleted file mode 100644 index 7c48827..0000000 --- a/freedom-maker/source/etc/fstab +++ /dev/null @@ -1,6 +0,0 @@ -/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/freedom-maker/source/etc/hosts b/freedom-maker/source/etc/hosts deleted file mode 100644 index e252996..0000000 --- a/freedom-maker/source/etc/hosts +++ /dev/null @@ -1,7 +0,0 @@ -127.0.0.1 localhost freedombox fbx -::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/freedom-maker/source/etc/mtab b/freedom-maker/source/etc/mtab deleted file mode 100644 index e69de29..0000000 diff --git a/freedom-maker/source/etc/network/interfaces b/freedom-maker/source/etc/network/interfaces deleted file mode 100644 index 9680bed..0000000 --- a/freedom-maker/source/etc/network/interfaces +++ /dev/null @@ -1,25 +0,0 @@ -# This file describes the network interfaces available on your system -# and how to activate them. For more information, see interfaces(5). - -# The loopback network interface -auto lo -iface lo inet loopback - -# The primary network interface -auto eth0 -iface eth0 inet static - address 192.168.1.1 - netmask 255.255.255.0 - -allow-hotplug eth1 -iface eth1 inet dhcp - -# auto uap0 -# iface uap0 inet static -# address 192.168.2.1 -# netmask 255.255.255.0 -# post-up uaputl sys_cfg_ssid "freedombox" -# post-up uaputl sys_cfg_protocol 32 # WPA2 -# post-up uaputl sys_cfg_wpa_passphrase "freedombox123" -# post-up uaputl sys_cfg_cipher 8 8 # AES CCMP -# post-up uaputl bss_start diff --git a/freedom-maker/source/etc/openvpn/client.conf b/freedom-maker/source/etc/openvpn/client.conf deleted file mode 100644 index e69de29..0000000 diff --git a/freedom-maker/source/etc/openvpn/static.key b/freedom-maker/source/etc/openvpn/static.key deleted file mode 100644 index e69de29..0000000 diff --git a/freedom-maker/source/etc/resolv.conf b/freedom-maker/source/etc/resolv.conf deleted file mode 100644 index af9304d..0000000 --- a/freedom-maker/source/etc/resolv.conf +++ /dev/null @@ -1,2 +0,0 @@ -nameserver 208.67.222.222 -nameserver 208.67.220.220 diff --git a/freedom-maker/source/etc/sysctl.conf b/freedom-maker/source/etc/sysctl.conf deleted file mode 100644 index 916e972..0000000 --- a/freedom-maker/source/etc/sysctl.conf +++ /dev/null @@ -1,5 +0,0 @@ -# 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/freedom-maker/source/etc/udev/rules.d/75-persistent-net-generator.rules b/freedom-maker/source/etc/udev/rules.d/75-persistent-net-generator.rules deleted file mode 100644 index e69de29..0000000 diff --git a/freedom-maker/source/sbin/copy2dream b/freedom-maker/source/sbin/copy2dream deleted file mode 100644 index 267c2b6..0000000 --- a/freedom-maker/source/sbin/copy2dream +++ /dev/null @@ -1,47 +0,0 @@ -#!/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/freedom-maker/source/tmp/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.apt-key b/freedom-maker/source/tmp/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.apt-key deleted file mode 100644 index 5b6a4d3..0000000 Binary files a/freedom-maker/source/tmp/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.apt-key and /dev/null differ -- cgit v1.2.3