From 7fd7840ff403ff56d568ba49f07507ccf402c4e8 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Sun, 11 Aug 2013 17:09:03 +0200 Subject: [PATCH] Generating lease-file location based on config file. Place it on OpenWRT into /tmp => memory Conflicts: CHANGELOG --- CHANGELOG | 2 ++ Makefile | 1 + piratebox/piratebox/bin/generate_config_files.sh | 2 +- piratebox/piratebox/conf/piratebox.conf | 4 ++++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 30c1c6c..9347566 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -10,6 +10,8 @@ NOTE: This may only be a partial changelog, check github / your package manager * [Fixed] General cleaning * [Removed] [Testing] Executable, we will stick to service based * [New] possibility in install_piratebox.sh to exchange the hostname easily +* [Fixed] Hide dot files in directory-listing which are usually hidden files +* [New] Moved DHCP leasefile into memory on OpenWRT system (/tmp is memory) === v0.6G === * [Fixed] Hide dot files in directory-listing which are usually hidden files diff --git a/Makefile b/Makefile index 6c406dd..06195f4 100644 --- a/Makefile +++ b/Makefile @@ -48,6 +48,7 @@ $(OPENWRT_CONFIG_FOLDER): sed 's:DNSMASQ_INTERFACE="wlan0":DNSMASQ_INTERFACE="br-lan":' -i $@/piratebox.conf sed 's:192.168.77:192.168.1:g' -i $@/piratebox.conf sed 's:DROOPY_USE_USER="yes":DROOPY_USE_USER="no":' -i $@/piratebox.conf + sed 's:LEASE_FILE_LOCATION=$PIRATEBOX_FOLDER/tmp/lease.file:LEASE_FILE_LOCATION=/tmp/lease.file:' -i $@/piratebox.conf $(OPENWRT_BIN_FOLDER): mkdir -p $@ diff --git a/piratebox/piratebox/bin/generate_config_files.sh b/piratebox/piratebox/bin/generate_config_files.sh index 94ac288..52e4aa9 100755 --- a/piratebox/piratebox/bin/generate_config_files.sh +++ b/piratebox/piratebox/bin/generate_config_files.sh @@ -45,7 +45,7 @@ set_pathnames() { DEFAULT_HOSTS=$CONFIG_PATH/hosts DEFAULT_DNSMASQ=$CONFIG_PATH/dnsmasq_default.conf RADVD_CONFIG=$CONFIG_PATH/radvd_generated.conf - LEASE_FILE=$1/tmp/leases + LEASE_FILE=$LEASE_FILE_LOCATION LIGHTTPD_ENV_CONFIG=$CONFIG_PATH/lighttpd/env } diff --git a/piratebox/piratebox/conf/piratebox.conf b/piratebox/piratebox/conf/piratebox.conf index 5d55e1a..892164b 100644 --- a/piratebox/piratebox/conf/piratebox.conf +++ b/piratebox/piratebox/conf/piratebox.conf @@ -97,6 +97,10 @@ END_LEASE=250 #Leasetime (When should the client renew it's IP) LEASE_DURATION=12h +# Where is the leasefile stored to? +LEASE_FILE_LOCATION=$PIRATEBOX_FOLDER/tmp/lease.file + + # Define the netmask NETMASK=255.255.255.0