Skip to content
Browse files

Merge remote-tracking branch 'gargoyle/master'

  • Loading branch information...
2 parents 59f3e89 + a2fda01 commit ed211ae68b633c8340e024faa64315499cf00b6a @obsy committed Apr 21, 2012
View
26 package/gargoyle/files/usr/lib/gargoyle/restore.sh
@@ -63,6 +63,12 @@ uci commit
/etc/init.d/webmon_gargoyle stop 2>/dev/null
/etc/init.d/cron stop 2>/dev/null
+# tor eats up memory, stop it before proceeding
+if [ -e /etc/init.d/tor ] ; then
+ /etc/init.d/tor stop 2>/dev/null
+fi
+
+
mv /etc/config/gargoyle /tmp/gargoyle.bak
cp /etc/passwd /tmp/passwd
rm -rf /etc/rc.d/*
@@ -74,12 +80,15 @@ echo "127.0.0.1 localhost." > /etc/hosts #overwrites old file
have_overlay=$(df | grep "overlay$" 2>/dev/null)
if [ -n "$have_overlay" ] ; then
- tar xzf "$restore_file" -C /overlay 2>/error
+ mkdir -p /tmp/restore/data
+ tar xzf "$restore_file" -C /tmp/restore/data 2>/error
+ cp -r /tmp/restore/data/* /
else
tar xzf "$restore_file" -C / 2>error
fi
error=$(cat error)
+
# make sure http settings are correct for cookie-based auth
uci set httpd_gargoyle.server.default_page_file="overview.sh" 2>/dev/null
uci set httpd_gargoyle.server.page_not_found_file="login.sh" 2>/dev/null
@@ -121,6 +130,12 @@ if [ -n "$old_hqd2" ] ; then
fi
is_bridge=$(echo $(uci show wireless | grep wds) $(uci show wireless | grep client_bridge))
+have_ap=$(echo $(uci show wireless | grep "mode.*ap"))
+if [ -n "$have_ap" ] ; then
+ is_bridge=""
+fi
+
+
qos_enabled=$(ls /etc/rc.d/*qos_gargoyle* 2>/dev/null)
quotas_active=""
all_quotas=$(uci show firewall | grep "=quota$" | sed 's/=.*$//' | sed 's/^.*\.//')
@@ -225,11 +240,8 @@ rm /tmp/passwd
#this makes sure that we don't restore crontab that tries
#to save bwmon save files when rules don't exist, wiping old bwmon data
date -u +"%Y.%m.%d-%H:%M:%S" >/usr/data/time_backup
-/etc/init.d/ntpclient restart 2>/dev/null
-/etc/init.d/bwmon_gargoyle start 2>/dev/null
-/etc/init.d/cron start 2>/dev/null
-sleep 10
+sleep 3
rm -rf /tmp/restore_lock_file
if [ -n "$error" ] ; then
echo "<script type=\"text/javascript\">top.restoreFailed();</script>"
@@ -238,3 +250,7 @@ else
fi
echo "</body></html>"
+
+
+# reboot should be handled by calling function, not this script
+
View
4 package/tor/Makefile
@@ -120,13 +120,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=tor
-PKG_VERSION:=0.2.3.12-alpha
+PKG_VERSION:=0.2.3.13-alpha
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.torproject.org/dist \
https://archive.torproject.org/tor-package-archive
-PKG_MD5SUM:=16dc8b7567662750e33f35afbbc6f089
+PKG_MD5SUM:=503d7b043875e9745db7cb06a26e2c5c
PKG_INSTALL:=1
View
12 package/tor/patches/002-noV2routerremove.patch
@@ -1,12 +0,0 @@
---- a/src/or/routerlist.c 2011-12-15 11:27:07.000000000 -0500
-+++ b/src/or/routerlist.c 2011-12-19 16:08:22.947282142 -0500
-@@ -3679,7 +3679,9 @@
- * networkstatuses, then we should get more before we decide to kill
- * routers.) */
- /* we set this to true iff we don't care about v2 info, or we have enough. */
-+ const or_options_t *options = get_options();
- have_enough_v2 = !caches ||
-+ !(authdir_mode_any_main(options) || options->FetchV2Networkstatus) ||
- (networkstatus_v2_list &&
- smartlist_len(networkstatus_v2_list) > get_n_v2_authorities() / 2);
-

0 comments on commit ed211ae

Please sign in to comment.
Something went wrong with that request. Please try again.